var myTween1 = new TweenMax.to('.box1', 2, { width:70, height:70, repeat:-1, yoyo:true, ease: Bounce.easeOut, x: 30, paused:true }), myTween2 = new TweenMax.to('.box2', 2, { width:70, height:70, repeat:-1, yoyo:true, ease: Bounce.easeOut, x: 30, yoyoEase:true, paused:true }); $('.btn1').on('click',function(){ myTween1.resume(); }) $('.btn2').on('click',function(){ myTween2.resume(); }) $(".btn_kill1").on('click',function(){ myTween1.kill(); }) $(".btn_kill2").on('click',function(){ myTween2.kill(); })
<button type="button" class="btn1">Not yoyoEase</button> <button type="button" class="btn_kill1">Stop!!</button> <br><br> <div class="box box1"></div> <hr> <button type="button" class="btn2">OK yoyoEase</button> <button type="button" class="btn_kill2">Stop!!</button> <br><br> <div class="box box2"></div>
.box{width:50px;height:50px;background-color:#000}