Dragging with JavaScript


drag to move

 

drag handle to move

drag to move

vertical constraint


drag to move

horizontal constraint

drag to move

contrained to region

drag to move

exaggerated drag threshold

drag to move

absolutely positioned, constrained vertically and within visible area


Nothing novel going on here; just a basic cross-browser dragging library. Other examples, namely drag & drop sorting, build upon it.

Known Bug: an annoying little IE bug crept into this release. When an item starts to be dragged, it jogs to the right 5 pixels. You can see that it is exactly 5 pixels by watching the coordinate info in the status bar.

TODO