jquery - How to stop Tweenmax animation while animating -


i have tried stop animation before complete animation in tween-max. div top '0px' animating top '90px' in 3 seconds.if click on button want stop it.how ?

    tweenmax.to("div",3, {         top: '90px',      });      <div id="stop">stop</div> 

you can use kill() remove tween.

js: to remove tween.

 var tween:tweenmax = tweenmax.to("div",3, { top: '90px' });   //then later...  tween.kill(); 

source


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -