JQuery synchronous animation

前端 未结 7 1930
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-29 07:00

In many cases I wish animation to be executed synchronously. Especially when I wish to make a a series of sequential animations.

Is there an easy way to make a jQuer

7条回答
  •  情歌与酒
    2020-11-29 07:12

    jQuery can make synchronous animations. Check this out:

    function DoAnimations(){
      $(function(){
        $("#myDiv").stop().animate({ width: 70 }, 500);
        $("#myDiv2").stop().animate({ width: 100 }, 500);
      });
    }
    

提交回复
热议问题