March 27, 2012
jquery fadeOut callback functions not working
Question by daniel.tosaba
I found it in Jquery documentation that fadeOut()
accepts callback function but in my case that function is not executing?? Take a look:
$("div.icon").stop(0,0).fadeOut(250,function(){
$("div.expanded").stop(0,0).fadeIn(250);
});
$("div.expanded").stop(0,0).fadeOut(250,function(){
$("div.icon").stop(0,0).fadeIn(250);
});
Do you guys see something that I am missing here??
Many thanks
Answer by Starx
Omit the stop()
, you dont need that. It only stop the animation prematurely.