Jump to content
Search Community

eccojava

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by eccojava

  1. 3 hours ago, PointC said:

    The problem is you have a listener on the reverse button that will indeed reverse the timeline, but that button is inside the div with the listener to play the timeline. So when you click to reverse, the event bubbles up to the parent and instantly plays the timeline. You'll need to stopPropagation() to make this work. I stripped out all the extra timelines and unnecessary code in this fork:

     

     

     

     

    more info about stopPropagation():

    https://developer.mozilla.org/en-US/docs/Web/API/Event/stopPropagation

     

    We appreciate demos with questions, but if you can simplify them to a bare minimum when you have a question, that would be great. Happy tweening.

    Thanks for your help, and sorry for the long code.

    GRACIAS

  2. Hi

    I have not a lot of experience programming.

     

    I try to do a small project to practice an to learn about GSAP.

     

    I have a problem wen I try to reverse a Timeline, I Think is becase the function that execute the reverse() is inside an other function.

     

    the problem appears when I click the first photo an then it move that photo an it reveal a text a 2 buttons; the black button on the left should reverse the timeline "exp1".

    The line code where Is the reverse() in JS is line 74

    Hope some one can help with this problem

    See the Pen xeJNdW by gduque (@gduque) on CodePen

×
×
  • Create New...