Results 1 to 3 of 3

Thread: chain jQuery

  1. #1
    Join Date
    Jan 2008
    Posts
    441
    Thanks
    67
    Thanked 4 Times in 4 Posts

    Default chain jQuery

    can anyone lend a hand please
    i want to chain animations so that it all happens together at once, not in a series

    Code:
    $("#swipeMask").animate({"top": "0px"}, 500).animate({ backgroundColor: '#ffffff' }, 200);
    Last edited by ggalan; 12-28-2010 at 07:18 PM.

  2. #2
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    I don't think you can animate background colour (at least not with the standard jQuery - think there's a plugin for it).

    Anyway, to do multiple animations at the same time, do it like this:

    Code:
    $("#swipeMask").animate({
    	"top": "0px",
    	"left" : '20px'
    	// Add any more properties you want to animate here
    }, 500);

  3. The Following User Says Thank You to Schmoopy For This Useful Post:

    ggalan (12-28-2010)

  4. #3
    Join Date
    Jan 2008
    Posts
    441
    Thanks
    67
    Thanked 4 Times in 4 Posts

    Default

    the backgroundColor worked!
    Code:
    $("#swipeMask").animate({"top": "0px", backgroundColor: '#ffffff'}, 700);

Bookmarks

Posting Permissions

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