代码之家  ›  专栏  ›  技术社区  ›  user979331

jQuery-animate().css()完成

  •  0
  • user979331  · 技术社区  · 6 年前

    我这里有一段代码:

    $('.section1').animate().css('overflow', 'visible');

    如何对此应用完成处理程序?

    1 回复  |  直到 6 年前
        1
  •  1
  •   Cjmarkham    6 年前

    the docs .animate 接受动画完成时触发的回调。

    $('div').animate({ 
      top: 0 
    }, 500, function (e) { 
      // Set this elements overflow to visible once
      // the animation has been completed
      $(e.currentTarget).css({overflow: 'visible'})
    })