且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

是什么决定了jQuery链中方法的执行顺序?

更新时间:2023-01-02 07:46:42

如果你想等到每个动画完成在执行下一步之前,请使用文档中详细介绍的动画回调:

If you want to wait until each animation completes before doing the next step, use the animation callbacks detailed in the documentation:

$('#bar').click(function () {
  $('#foo p').hide('slow', function(){
    $(this).appendTo('#bar').show('slow');
  });
});