View Full Version : Resolved chain jQuery
ggalan
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);
Schmoopy
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:
$("#swipeMask").animate({
"top": "0px",
"left" : '20px'
// Add any more properties you want to animate here
}, 500);
ggalan
12-28-2010, 07:17 PM
the backgroundColor worked!
$("#swipeMask").animate({"top": "0px", backgroundColor: '#ffffff'}, 700);
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.