Let's say I have got HTML code that looks as follows:
<script>
$("#draggable").draggable();
$("#clickable").click(function() {
alert('CLICK!');
});
</script>
<div id="draggable">
<div id="clickable">
</div>
</div>
As you can see: clickable div is nested in draggable div. When I drag & drop draggable div using clickable div as handle click event bound to it is fired. That is not desired behaviour. I want the click event to be fired only when you click on clickable but without dragging it anywhere. Is it even possible? I want to add I'm not interested in solutions where setTimeout (or similar) is used. Here you have got jsfiddle link (note: css is added for better visibility).
Thanks for any clues!