Share Posted May 15, 2020 I have an issue i can't figure out. So i have draggable elements with 2 classnames.. 'dragObj num1' The 2 classnames 'dragObj' and 'num1' give me the option to treat a bigger set of objects the same... all dragObj and when dropped watch for the complete className...drobObj num1 or whatever and act on that. Issue now is that gsap ( gsap3) doesnot allow me to target the element with its full className... 'dragObj num1' When i target all dragObj... so with just 1 of the classes it works as expected, but then all my objects act.. Any tips ? Link to comment Share on other sites More sharing options...
Share Posted May 15, 2020 How are you addressing the element(s) with these two classes? gsap.to( '.dragObj.num1' , {} ); ... is what you should be doing if you’re not already. See the Pen QWjVJem by sgorneau (@sgorneau) on CodePen Shaun 4 Link to comment Share on other sites More sharing options...
Author Share Posted May 16, 2020 That's it. Thx Shaun Link to comment Share on other sites More sharing options...
Share Posted May 18, 2020 Happy to help! 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