Jump to content
Search Community

Clicking Tab in GSAP Moves Other Tabbed Content

MrCapp test
Moderator Tag

Recommended Posts

Hello there. I'm using a copy of an animation from @PointC to display some content in a page.

The animations and everything have been working fine but I've run into an issue now that I've moved that content into a page with other things that have Javascript as well.

Each time I click the tabs in the GSAP modue, the indicators in the older - non-GSAP - version of the same module move as well. When I click Simple setup on the top module, both the blue & grey indicators move.

1600862830_Screenshot2022-09-13at7_52_33AM.thumb.png.e40d4b6ee66b7508dcfa0355bb67d808.png

I suspect it's obvious to someone with more Javascript experience but I'm not that guy so I'm scratching my head on how to fix it.

I think it has something to do with using this.index and not being specific enough with naming to make sure that clicking the tabs in the GSAP module does not  affect content in other modules. What can I change in the Codepen to make sure I'm only affecting that content?

Any suggestions would be greatly appreciated!

See the Pen oNdjmJP by OddboxStudio (@OddboxStudio) on CodePen

Link to comment
Share on other sites

Hi @MrCapp,

 

Unfortunately you forked Craig's codepen and didn't change anything on it. We can't help you identify your problem without a live editable sample that we can look at.

 

For your comments I can gather that you might have some conflicts with some classes and selectors, so take a good look at that and if possible create a reduced codepen that shows exactly the issue you're running into.

 

Happy Tweening!!!

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