Here there is an example :
<div id='example'>
ciao
</div>
$('#example').fadeOut(600).delay(600).remove();
I want to fadeout the element, than remove it, but looks like that .remove() ignore .delay() (so the element is removed immediatly).
How can I fix this trouble?
.remove is not about animating, so .delay has no effect.
What you can do is passing a function which gets executed when the animation has finished (the callback argument - see http://api.jquery.com/fadeOut/):
$('#example').fadeOut(600, function() {
$(this).remove();
});
http://jsfiddle.net/pimvdb/Sny7P/1/
Specify a callback instead
$('#example').fadeOut(600, function() { $(this).remove(); });
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