【问题标题】:jQuery - destroy animationjQuery - 销毁动画
【发布时间】:2012-05-31 07:35:39
【问题描述】:

如何销毁同一元素上创建的动画?

例如: 我有动画

$('#sortable').animate({
    paddingTop: 85
}, 100);

在同样的动作中,我想摧毁它,因为我不再需要它了。 比如:

$('#sortable').animate('destroy');

但它不起作用。

【问题讨论】:

标签: jquery jquery-animate destroy


【解决方案1】:

只需使用stop()

$('#sortable').stop(true);// first argument removes all animations in the queue

【讨论】:

    猜你喜欢
    • 2015-11-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多