jenstarr Posted February 8, 2022 Share Posted February 8, 2022 Hi, I'm trying to adjust a toggleClass where after it toggles on onEnter, it doesn't toggle off until onLeaveBack but you can see the toggle happen for a second on onEnterBack. I've tried adding complete and pause to the onLeave to see if I can get rid of it and nothing seems to work. What is the best way to do this? I appreciate any help, thanks. See the Pen eYeYKog by jenstarr (@jenstarr) on CodePen Link to comment Share on other sites More sharing options...
OSUblake Posted February 8, 2022 Share Posted February 8, 2022 Hi jenstarr, As noted in the docs, toggleClass is applied when the active/inactive state changes. If you need it to behave differently, you should use the appropriate callbacks for the effect you want. Quote To have toggle class names in a different way, use the callback functions (onEnter, onLeave, onLeaveBack, and onEnterBack). 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