开发者

end two jquery animations simultaneously

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();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜