$dragPos

defines the position of a dragged item

function $dragPos;

Example

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

Related samples

Details

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
Join Our Forum
We've retired comments here. Visit our forum for faster technical support, connect with other developers, and share your feedback there.