christof Posted September 6, 2021 Share Posted September 6, 2021 I'm new to gsap and wanted to know if it was possible to reproduce the effect of this page. The effect of adding a class to the hover and deleting the class on a second hover https://arnaudlajeunie.com/work thank you to you <3 Link to comment Share on other sites More sharing options...
Cassie Posted September 6, 2021 Share Posted September 6, 2021 Hey Christof, there's no animation in this example. You can toggle a class with JS though. item.addEventListener('mouseenter', function (){ item.classList.toggle('class'); }); 3 Link to comment Share on other sites More sharing options...
christof Posted September 6, 2021 Author Share Posted September 6, 2021 Thank you very much, this is exactly what I needed I share with you my code here needs $(function(){ $('.gallery__item').on('mouseenter', function(event){ event.preventDefault(); $(this).toggleClass('hover-in'); }); }); 1 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