Reputation: 1797
I have two jquery animations running in two different elements. Both are triggered at the same time. Now i want to end these to animations at the same time irrespective of the durations each take to animate.
jQuery("#maindiv").animate({ scrollLeft:10 }, 500);
jQuery(".sidediv").animate({ marginLeft:-100 }, 500);
Is this possible?
Upvotes: 0
Views: 444
Reputation: 195972
If you want to forcibly end them, use the .stop()
method.
jQuery('#maindiv, .sidediv').stop();
Upvotes: 3