I have two jquery animations r开发者_开发问答unning 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?
If you want to forcibly end them, use the .stop()
method.
jQuery('#maindiv, .sidediv').stop();
精彩评论