Jump to content
Search Community

Cofkeb

Members
  • Posts

    7
  • Joined

  • Last visited

Cofkeb's Achievements

  1. Hello everyone, So basically I want to pin/unpin element depending on device width I have function for window resizing and I am changing the value of variable z inside the function, my question is how can I achieve this i tried with code below but it doesn't seem to work. window.addEventListener('resize', function(event) { var w = window.innerWidth; console.log(w); if(w>769){ z=true; } else{ z=false; } }, true); let tl = gsap.timeline({ scrollTrigger: { trigger: '.o-meni-desno', start: '30% center', end: '100% center', markers: true, toggleActions: 'restart none none none', scrub: 1, pin: function() { return z ? '.o-meni-levo' : false; }, pinSpacing: false, } });
  2. Hello, I have a problem with text overflowing the x-axis. So in the codepen above you can see my example. What bothers me is when the text is not pinned it does not overflow but when I use gsap scroll trigger to pin it the text overflows the screen how can I fix this? Any advice would be much appreciated!
  3. Thank you so much, the issue was the calculation part in .to{} section of js code that was giving me headaches, I just wasn't sure how to scrub scroll the big text silly me ?. Again thank you for your time and thank you for helping me.
  4. Hello, I need help with animating big text, so what I want to make is basically when I enter a section I want to pin big text and want to animate it to show one letter at a time while scrolling through the whole section and also fading in text from the left side. Now the problem is I don't know how to properly animate text on the right. Any help or advice would be much appreciated. Thank you in advance!
  5. Thank you so much, the thing that was bothering me the most was that I thought I could pin panel2 again but the problem was with the trigger because the scale of the panel was changing and the trigger would "trigger early" or not where I wanted it to. The solution to my problem is just to extend the end of the trigger so that I have more time to animate elements inside and also what I have found helpful was that I added a bit of delay at the end of the text animation just so that the animation ends properly before continuing with the normal scrolling. Again thank you so much for the answer.
  6. Hello, I want to pin panel2 after the animation has finished, because I would like to animate other elements inside the panel2 after it takes 100% of the screen but I don't know how or what to use to pin panel2 for little more while to finish all animations inside. Thank you in advance!
×
×
  • Create New...