defines the position of a dragged item

function $dragPos;


list.$dragPos = function(pos, e, node){
    pos.y = 10; // fix the y position, so only a horizontal drag will be possible

Related samples


Can be redefined for a custom dnd behavior.

There are 3 parameters:

  • the position object (has x and y properties)
  • the event object
  • the HTML node of the drag marker

You can modify pos.x and pos.y. The updated values will be applied to the drag marker.

See also
Back to top