Jump to content
Search Community

Class with draggable plugin

dkolb5 test
Moderator Tag

Recommended Posts

Hi All,

 

I created a JS class that uses the Draggable plugin. Once I added a second slider to the codepen, it will only drag on the first slider. I checked the documentation and gave each one an id just to be sure.  

 

The strange part about it's when I try to drag the second slider. It moves the first one instead the the second. 

 

Can anyone tell me what I am doing wrong when creating my Draggable.create() on line 214?

 

See the Pen dyGrMdJ by bws_dan (@bws_dan) on CodePen

Link to comment
Share on other sites

Unfortunately this is beyond the scope of GSAP-specific support we provide in these forums. It's more of a consulting project dealing with general structure and logic issues in the code rather than a GSAP question. I already spent quite a bit of time in two other threads trying to help you with that slider you're building and I just can't afford to dig further. It was all logic issues from what I saw, but if you think there's a problem with GSAP/Draggable, we'd be happy to take a peek at a reduced test case that clearly shows the problem.

 

Maybe someone else has time to jump in and offer consulting for the challenge you're facing which would be great. Otherwise, perhaps it's time to hire a consultant to help out(?) You're welcome to post in the jobs/freelance forum.

 

Good luck with the project!

  • Like 1
Link to comment
Share on other sites

Hey Jack. I took your advice and made a stripped down version and was able to solve my issue!

 

See the Pen zYrQXYP by bws_dan (@bws_dan) on CodePen

 

I apologize for not seeing the issue was with my logic. I thought it was something due to the Draggable plugin. You're feedback and help along the way is much appreciated and helped me wrap this part of my project up. If I come across a similar issue I'll try a smaller scale test before adding another thread.

 

Thanks again!

  • Like 1
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.
×
×
  • Create New...