Jump to content
Search Community

Blur In/Out with Text

devin1229 test
Moderator Tag

Recommended Posts

Hi - I'm trying to do a little fading/blurring with text where text blurs when you scroll in. This works, but what I'd like to do is have the text "unblur" (i.e., return to its initial state) after you pass the block of text. I've been reading the documentation and it seems like it's something to do with callbacks? Maybe?

See the Pen GRyywEx by devin1229 (@devin1229) on CodePen

Link to comment
Share on other sites

You could use an onLeave callback to reverse the tween once you hit the end. Maybe something like this:

See the Pen 16a34143e5171f4ffb578c5af5bc31ea by PointC (@PointC) on CodePen

 

If it were me, I'd skip the scrub and go with toggleActions like this.

See the Pen ee502a530e23e7692883f169082d77e4 by PointC (@PointC) on CodePen

 

Just my 2 cents. YMMV.

 

Happy tweening.

:)

 

  • Like 2
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...