sai1716 Posted February 5, 2021 Share Posted February 5, 2021 Hello Gsap community...I am a newbie with using gsap....I was working on a project in which I am using scroll trigger to display the website horizontally... The problem is that the anchor tags in my home page are not working... I want the anchor tags to scroll to specific divs(having their own ID) on click....I am also setting the width of the section divs using percentages as well as pixels..... I have provided a demo for reference...any help will be appreciated See the Pen bGBEKBQ by light1716 (@light1716) on CodePen Link to comment Share on other sites More sharing options...
akapowl Posted February 5, 2021 Share Posted February 5, 2021 Hey @Saisarvesh Naik - welcome to the forums. The tags are not working as you'd expect because you are not natively scrolling horizontally but only faking it when scrolling vertically, thus you'd have to take care of that functionality yourself. There's a demo on the ScrollTrigger demoes page that shows an example of how to do that with the help of GSAP's scrollTo-Plugin See the Pen bGexQpq by GreenSock (@GreenSock) on CodePen Also, if you search the forums, you will find quite a few threads with a similar topic, which might be helpful for you. Hope this helps. Cheers 3 Link to comment Share on other sites More sharing options...
sai1716 Posted February 6, 2021 Author Share Posted February 6, 2021 Hi @akapowl Thank you so much for the reply...Ill check the solution posted by you. 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