I am trying this:
var notifications = $( "#notifications" );
notifications.fadeOut("slow")
.complete(function () {
alert('completed');
});
But I got: Uncaught TypeError: notifications.fadeOut(...).complete is not a function
Reference: http://api.jquery.com/fadeout/
There is two way to specify on-complete-callback:
By second parameter:
var notifications = $( "#notifications" );
notifications.fadeOut("slow", function () {
alert('completed');
});
or by options:
var notifications = $( "#notifications" );
notifications.fadeOut({
duration: "slow",
complete: function () {
alert('completed');
}
});