Jump to content
Search Community

Applying/removing element class mid-tween

PG1 test
Moderator Tag

Recommended Posts

Hi, 

 

So I'm making a revolving kebab sign because... well, I'm making one - let's leave it there.

 

I'm having trouble with the z-index of the stick element and the revolving text. I would ideally like the text to pass over the stick element at the front of the rotation, and behind it as it goes round the back.

Currently, it sits behind it at both points. I've tried a few things, but my current idea is that I can apply and remove the '.back' class (css line 55) to the stick element as the text goes round. I could use some sort of timer, but guessing gsap would be better. 

Open to any other ides for achieving this too.

Cheers

See the Pen 7f11f2698f254d9134bb87073eee0aee by petegarvin1 (@petegarvin1) on CodePen

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