Hey Guys,
I was wondering if there is a better way to do this.
I have an arrow svg element that when hovered over bounces left and right in repeating yoyo. The only way I could think of to exit it was to pause the animation and then set a new tween telling it to go back to its start position. This works fine but I was wondering is there a more sophisticated way to accomplish this, i.e. is it possible to intercept the first tween and tell it to finish it's current iteratio
Thanks to Carl for pointing me in the right direction.
If anyone can benefit from it here's the final code, a pretty simple and straightforward way to connect a repeating yoyo to a jQuery hover method.
var homeButton = $('button.home');
homeButton.each(function(){
$(this).hover(over, out);
var buttonSVGElement = $(this).find('svg'),
homeButtonAnimation = new TimelineMax({repeat:-1, onRepeat: pauseAnimation, paused:true}),
play;
homeBut