Allow elements to be moved using the mouse.

Drag me around

Constrain movement along an axis:

I can be dragged only vertically

I can be dragged only horizontally

Or to within another DOM element:

I’m contained within the box

I’m contained within my parent

I will always stick to the center (relative to the mouse)

My cursor is at left -5 and top -5

My cursor position is only controlled for the ‘bottom’ value

Drag me to trigger the chain of events.

  • “start” invoked 0x
  • “drag” invoked 0x
  • “stop” invoked 0x
  • Drag me down
  • Item 1
  • Item 2
  • Item 3
  • Item 4
  • Item 5