SJH Posted September 5, 2021 Share Posted September 5, 2021 I can change the color of each SVG 'card' but I'd like to target just the text within each SVG 'card'. Because I have a lot of cards to target, I don't want to give each text item within the SVG a unique identifier. I just want to be able to rollover each card and have GSAP only target the text of the current card. Thanks for the help. See the Pen rNwMJYy by sandalwoodsh (@sandalwoodsh) on CodePen Link to comment Share on other sites More sharing options...
Solution GreenSock Posted September 5, 2021 Solution Share Posted September 5, 2021 Perhaps like this?: function onMouseEnter(obj) { gsap.to(obj.querySelector("text"), { fill: "#9234eb"}); } 2 Link to comment Share on other sites More sharing options...
SJH Posted September 6, 2021 Author Share Posted September 6, 2021 Thanks for the solution and quick reply, Jack. 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