Jump to content
Search Community

offsetY units other than pixels with ScrollTo Plugin?

TimTh test
Moderator Tag

Go to solution Solved by OSUblake,

Recommended Posts

Hi -


When using the ScrollTo plugin I'd like to set the offset using vh instead of px, but offsetY seems to take only numeric values in pixels.  offsetY: "5vh" or even offsetY: "20px" don't seem to work. Am I missing something, or if px is the only unit allowed with ScrollTo, is there a way to accomplish what I'm trying to do with a regular tween, without the ScrollTo plugin?  Apologies if the answer is obvious/basic, I'm new to GSAP and didn't see anything on the forums or with a general google search.  Thanks for any advice!

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...