According to the jQuery documentation for .click(), the event is triggered only after this series of events:
Keep track of the mouse position between mousedown and mouseup to see it the mouse pointer moved. You should probably add a little margin of error, like a few pixels every way, but below is a simplified example :
var left = 0,
top = 0;
$(element).on({
mousedown: function(e) {
left = e.pageX;
top = e.pageY;
},
mouseup: function(e) {
if (left != e.pageX || top != e.pageY) {
alert(' OMG, it moved ! ');
}
}
});