JSFiddle - React, Tailwind, and code Playground
by Ken Watanabe
HTML
<div id="wrap">
<div id="draggable">
<img src="http://www.presentandcorrect.com/blog/wp-content/uploads/2012/11/tumblr_mcf11pk4nj1ru82ue.jpg" id="martens" class="object01" />
</div>
</div>
CSS
#wrap {
width:100%;
height:100%;
}
#draggable {
cursor:move;
}
#martens {
position:relative;
}
.object01 {
width: 300px;
height: auto;
top: 100px;
left: 100px;
}
JavaScript
var dragged = false;
$("#draggable").draggable({stop:function(ev,ui) { dragged = true;}});
$("#martens").click(function() {
if(!dragged)
alert('CLICK!');
dragged = false;
});