View Full Version : Resolved chain jQuery

12-28-2010, 06:21 PM
can anyone lend a hand please
i want to chain animations so that it all happens together at once, not in a series

$("#swipeMask").animate({"top": "0px"}, 500).animate({ backgroundColor: '#ffffff' }, 200);

12-28-2010, 06:55 PM
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:

"top": "0px",
"left" : '20px'
// Add any more properties you want to animate here
}, 500);

12-28-2010, 07:17 PM
the backgroundColor worked!

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