jQuery:从元素停止动画? [英] jQuery: stop animation from element?

查看:84
本文介绍了jQuery:从元素停止动画?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在将动画应用于元素时-例如div.animate()-如何将动画与单个元素解除绑定?

when applying animation to an element - eg. div.animate() - how can i unbind that animation from single elements?

我尝试了div.unbind()和div.unbind("animate"),但是没有用..

i've tried div.unbind() and div.unbind("animate") but didnt work..

谢谢

推荐答案

我认为您需要这个:

$('#div').stop(); // this stop the currently-running animation

动画没有绑定到元素,而只是一种效果=>您无法取消绑定

The animation is not bind to an element, it is just an effect => you can't unbind

这篇关于jQuery:从元素停止动画?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆