Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Feb 2006
    Posts
    168
    Thanks
    32
    Thanked 1 Time in 1 Post

    last callback in JQuery not functioning

    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?

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

  • #2
    Senior Coder
    Join Date
    Dec 2010
    Posts
    2,355
    Thanks
    11
    Thanked 558 Times in 551 Posts
    Yes you did

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

  • #3
    Regular Coder
    Join Date
    Feb 2006
    Posts
    168
    Thanks
    32
    Thanked 1 Time in 1 Post

    Smile

    I appreciate the help. Thanks for pointing it out for me. I'm still learning.

    thanks again.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •