...

View Full Version : last callback in JQuery not functioning



gribbs100
01-16-2011, 11:19 PM
Hello guys,

I'm new to JQuery. Very new. I wrote some functions using callbacks. I wanted them to happen in sequence. the first 2 functions happen but the 3rd (#blackcontainer), does not happen.

#blackfill should animate, then when completed, #grid should animate, then when completed, #blackcontainer should animate.

Did I code this wrong?



$(function(){
$("#blackfill").animate({height:'toggle'},600,function(){
$("#grid").animate({height:'toggle'},500),function(){
$("#blackcontainer").animate({width:'toggle'},400)};
});
});

devnull69
01-17-2011, 07:37 AM
Yes you did



$("#grid").animate({height:'toggle'},500),function(){
^--- This parenthesis
$("#blackcontainer").animate({width:'toggle'},400)
};
^--- should be here

gribbs100
01-17-2011, 02:10 PM
I appreciate the help. Thanks for pointing it out for me. I'm still learning.

thanks again.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum