I have the following code to rotate a div. By mousedown event on the image in the upper-right corner of the same div. I want the div to rotate till mouse up. logically I bel
I think this stack overflow question answers your question How to get mouseup to fire once mousemove complete
The trick is to "ecapsulate" the mousemove and mouseup events in the mousedown event.