nickbarfuss
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by nickbarfuss
-
-
I'm using Draggable to create scrollable element with several divs inside it. For example
<div id="draggable"> <div>example</div> <div>example</div> <div>example</div> </div>
I want to apply some mousedown jquery code to the divs. for example:
$("#draggable div").on("mousedown", function() { //do something... });
The Draggable seems to overwrite and/or steal jQuery's mousedown event.
If I disable the Draggable then there is no issue.
If I apply some click jquery there is no issue either. for example:
$("#draggable div").on("click", function() { //do something... });
I do need to use the mousedown event in this scenario.
Has anyone encountered something similar, or does anyone have a solution?
Draggable steals jquery mousedown
in GSAP
Posted
Thanks OSUblake.
This got me on the right track. Now all the content inside of the draggable can have jquery listeners attached. Thanks!
I'm now seeing why allowEventDefault is not set to true by default, because now all the content gets mousedown and click when i click and drag. But I guess that is another problem to figure out on my end.