Hi, First I want to say great forums, I have been reading and learning a lot, thank for helping out. This is more probobly jquery than GSAP problem but I'm trying to play and reverse my timeline on click event. I'm struggling to bind the play() and reverse() to my function. When buttom is clicked the timeline will play and reverse it. Here is what I have so far:
var tl = new TimelineLite();
$('.home').on('click', function(event) {
event.preventDefault();
tl.to('.sidebar, .main', 1, {x:-231, ease:Power2.easeIn});
});
What is the best way of binding play() and reverse() to a same anchor? I would really appreciate your help.
Thanks, Peter