Javascript JQuery:如何触发两个动画?
我想知道我是否可以淡出以及滑动闪光通知,但唯一有效的是淡出。我能做什么Javascript JQuery:如何触发两个动画?,javascript,jquery,Javascript,Jquery,我想知道我是否可以淡出以及滑动闪光通知,但唯一有效的是淡出。我能做什么 $(document).ready(function() { setTimeout(function(){ $('#flash_wrapper').fadeOut("slow", function() { $(this).remove(); }) },
$(document).ready(function() {
setTimeout(function(){
$('#flash_wrapper').fadeOut("slow", function() {
$(this).remove();
})
}, 4500);
});
</script>
$(文档).ready(函数(){
setTimeout(函数(){
$(“#flash_wrapper”).fadeOut(“slow”,function(){
$(this.remove();
})
}, 4500);
});
我希望能够同时使用slideUp
和FadeOut
。我该怎么做?我仍然不知道如何让这些工作您可以使用jQuery设置CSS属性的动画:
$('#flash_wrapper').animate({
height: 0, // like slideUp
opacity: 0 // like fadeOut
},
4500, // speed
function () { // called when animation is complete
$(this).remove();
});
可能重复的