Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Math

selector with multiple class names

Recommended Posts

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

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

  • Like 4
Link to comment
Share on other sites

That's it. Thx Shaun

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