I have some elements on a page which are draggable. These same elements have a click event which navigates to another page. I'm trying to determine the best way of preventing the click event from firing if the user is dragging but still allow the click event if not dragging. Anyone have any ideas of the best way to accomplish this?
Javascript – Preventing JavaScript click event with Scriptaculous drag and drop
drag and dropevent handlingeventsjavascriptscriptaculous
Related Topic
- Javascript – How to change an element’s class with JavaScript
- Javascript – Event binding on dynamically created elements
- Javascript – Compare two dates with JavaScript
- Javascript – Get the current URL with JavaScript
- Javascript – What does “use strict” do in JavaScript, and what is the reasoning behind it
- Javascript – Preventing click event with jQuery drag and drop
- Javascript – jQuery checkbox change and click event
- Javascript – jQuery checkbox checked state changed event
Best Answer
I solved this by using something like the following: