【问题标题】:jquery, how to animate element after being sure that it's not being animated at the same timejquery,在确定元素没有同时被动画后如何动画元素
【发布时间】:2009-12-05 12:27:17
【问题描述】:
$("sth").not(':animated').animate();

在确定元素没有同时被动画化之后,这是动画化元素的最佳方式吗?

谢谢

【问题讨论】:

    标签: javascript jquery jquery-selectors


    【解决方案1】:

    取决于你想要什么,是的。虽然我很好奇sth 选择器是什么:)

    $("#id:not(:animated)").animate(); // Is another way to write it
    

    或者,如果您只是想在它再次动画之前停止它,请使用stop()

    $("#id").stop().animate();
    

    【讨论】:

      猜你喜欢
      • 2015-09-03
      • 1970-01-01
      • 1970-01-01
      • 2015-01-09
      • 2012-08-01
      • 2019-04-29
      • 2017-04-27
      • 1970-01-01
      • 2012-11-06
      相关资源
      最近更新 更多