Jump to content
Search Community

Hi! I want to create horizontal slider. I already created it but my problem is the marker gone from the area of trigger element.

Sakil_Anwar12 test
Moderator Tag

Recommended Posts

Hi @Sakil_Anwar12 and welcome to the GreenSock forums!

 

When creating a thread, besides the minimal demo (thanks for that! 🥳) is always an extra to be explicit about what you're trying to do. In this case it seems that you're trying to create a horizontal section using ScrollTrigger.

 

The main problem is that the panels container doesn't have any styles applied to it and also it should have a wrapper with overflow hidden in order to hide the elements. Here is a fork of your codepen:

See the Pen yLEgydZ by GreenSock (@GreenSock) on CodePen

Hopefully is enough to get you started.

 

Happy Tweening!

  • Like 1
Link to comment
Share on other sites

Yeah! Now Perfectly working brother. But There has another problem, I don't need 100vh, I need only fit-content width.And when i visit first time , it is working perfectly but when we reload my website , the marker went out of the trigger section. Could you please give me the solution?

Screenshot_1.png

Edited by Sakil_Anwar12
I fount another problem in my code.
Link to comment
Share on other sites

It's pretty tough to troubleshoot without a minimal demo - the issue could be caused by CSS, markup, a third party library, your browser, an external script that's totally unrelated to GSAP, etc. Would you please provide a very simple CodePen or CodeSandbox that demonstrates the issue? 

 

Please don't include your whole project. Just some colored <div> elements and the GSAP code is best (avoid frameworks if possible). 

 

Once we see an isolated demo, we'll do our best to jump in and help with your GSAP-specific questions. 

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