how to call a function when the animation is complete
$s.css({"opacity": 0}, 500).removeClass("active");
how to call a function when the animation is complete
$s.css({"opacity": 0}, 500).removeClass("active");
I think this will be more correct.
$ ('# selector'). animate ({opacity: 0}, 500, function () {alert ('Animation ended with');});
A more detailed example here is http://jsfiddle.net/Rigiytip/R2hF4/
Source: https://ru.stackoverflow.com/questions/268334/
All Articles