I'm having trouble with the following code:
$(".active").animate({
opacity:0
},{queue: false, duration:1000}, function(){
console.log("queue??");
$(".active").css('display', 'none');
$(".active").removeClass("active");
initiatePage();
});
After adding queue: false
, the function()
ain't running at all... but if I don't, they just queue up, and I don't want that to happen either.. Is there a way to make this animation and everything going with it queue: false
??
Let me know if I can provide anything to make it easier for you to help..
Thanks!
Read the animate() manual. When using the options
the callback should be passed using the complete
option.
complete: A function to call once the animation is complete.
$(".active").animate({opacity:0},{
queue : false,
duration : 1000,
complete : function() {
$(this).hide().removeClass('active');
initiatePage();
}});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With