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.

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!