How to distinguish mouse “click” and “drag”

I use jQuery.click to handle the mouse click event on Raphael graph, meanwhile, I need to handle mouse drag event, mouse drag consists of mousedown, mouseupand mousemove in Raphael.

It is difficult to distinguish click and drag because click also contain mousedown & mouseup, How can I distinguish mouse “click” & mouse “drag” then in Javascript?

19 Answers
19

Leave a Comment