Jump to content
GreenSock

PSMJonas

Members
  • Posts

    5
  • Joined

  • Last visited

About PSMJonas

  • Birthday 06/21/1995

Profile Information

  • Gender
    Male

PSMJonas's Achievements

  1. I have the problem that it takes a few seconds for my animation (timeline) to start. Unfortunately, I have no idea what could be the reason for this. I have already tried to set the delay to 0, unfortunately without success.
  2. Ah, thanks for the approach. I have solved the whole thing via an associative array, I think it also works: https://codepen.io/jonasloerken/pen/vYpNyBp?editors=1111
  3. Thank you very much for your answer. The problem is that the overlay is dynamic. I have updated the CodePen link again: https://codepen.io/jonasloerken/pen/vYpNyBp This leads to the fact that I can not create the timeline outside of a function, right? Otherwise I can't open or close the right overlay with the play() and reversed() functions.
  4. Hey guys, thanks for the response! Sorry, I totally forgot about the CodePen demo. Here is the link: https://codepen.io/jonasloerken/pen/vYpNyBp
  5. I use GSAP (Timeline) to show and hide an overlay. The overlay can be opened and closed without any problems. But when I want to open it again, it does not work. function animate_media(overlay, reversed) { var media_tl = gsap.timeline({repeat: 0, paused: true}); media_tl.from(overlay, {duration: 0.5, y: 30, autoAlpha: 0}); if(reversed) { media_tl.reverse(0); } else { media_tl.play(); } } I pass the element and a boolean value to the function (depending on whether the overlay should open or close). I noticed that the overlay keeps the following inline code after closing: opacity: 0; visibility: hidden; transform: translate(0px, 30px); Is there a possibility to show the overlay again after closing, i.e. to play the animation again?
×