zozo Posted March 19, 2021 Share Posted March 19, 2021 Hi Guys, I have this that is working : gsap.to(window, {duration: .5, delay: .5, scrollTo:'#post_preview_'+this.post.id, ease: 'Power1.easeInOut'}) I would like to do something like : gsap.to(window, {duration: .5, delay: .5, scrollTo:'#expertises_post_preview_'+this.post.id+' +=100', ease: 'Power1.easeInOut'}) But It's not working. Is there a way to scroll to 100px above my div ? Thanks ! Link to comment Share on other sites More sharing options...
Solution PointC Posted March 19, 2021 Solution Share Posted March 19, 2021 Have you tried offsetY? scrollTo: {y: "#yourID", offsetY: 100} 4 Link to comment Share on other sites More sharing options...
zozo Posted March 19, 2021 Author Share Posted March 19, 2021 8 minutes ago, PointC said: Have you tried offsetY? scrollTo: {y: "#yourID", offsetY: 100} Thanks Craig ! I knew there was a solution 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now