I know that I can make an image draggable by using $('#id').draggable();
But if the image contains some link-areas, these areas can’t be used for dragging. Is there a way to tell jQuery to differ between a click (the defined url for this area should be opend) and a drag (simply move the whole image)?
I know that I can make an image draggable by using $(‘#id’).draggable(); But if
Share
I found a way to achieve my goal.
The code for the image and the areas has to lay inside a div:
Then you can make the div draggable:
Because my areas don’t have urls defined but only onclick-events, I’m able to check the stopPropagation variable and decide whether to ignore the click or not.