Jump to content
Search Community

On every Mousewheel strange behaviour of Opacity. First time working fine and second time opacity is 0.

Ravina test
Moderator Tag

Recommended Posts

In ScrollTrigger and GSAP Vertically Pinned Sections  When i mouse wheel first time its updated opacity fine , but when 2nd time mouse wheel opacity is 0.  Some time also opacity in middle of 0 to 1 (Ex: 0.4343).  I want on every mouse wheel proper update opacity 1 so working smooth verticle mosue wheel . I tried lots of setting for it but its not working.

See the Pen VwbLZYV by JamiKazmi (@JamiKazmi) on CodePen

Link to comment
Share on other sites

Hi @Ravina welcome to the forum!

 

The best thing to do when working with ScrollTrigger is to remove it! This seems counter intuitive, but ScrollTrigger is just animating something on scroll, so just focus on the animation at first and only when you're happy with the animation add ScrollTrigger back in. This way you can focus on one part at a time and it will save a lot of headache when debugging. 

 

Also be sure to load the latest versions of the tool! (you were loading and old version). I've removed ScrollTrigger and enabled GSDevTools so we can easily visually inspect your animation. It doesn't seem to do a whole lot!? it is over a 100 seconds long, but doesn't do a whole lot. If yo drag the progress bar at the end it suddenly jumps to the last slide. My advies is try to debug you animation this way. Remove most of your tweens and keep the working once, then slowly introduce the next tween and test if everything is working (with out ScrollTrigger) if you get stuck post back here with what you've tried. 


If you're new to GSAP check out this awesome getting started guide https://gsap.com/resources/get-started/ Hope it helps and happy tweening! 

 

See the Pen GRLBwNv?editors=0010 by mvaneijgen (@mvaneijgen) on CodePen

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...