Draggable Class
Basic drag implementation for DOM elements inside a container. Provide start/stop/drag callbacks.
Constructor
Draggable
(
Object
-
el -
[options]
Parameters:
-
elHTMLElementThe HTMLelement that contains all the widgets to be dragged.
-
[options]Object optionalAn Object with all options you want to overwrite:
-
[items]HTMLElement | String optionalDefine who will be the draggable items. Can be a CSS Selector String or a collection of HTMLElements.
-
[distance]Number optionalDistance in pixels after mousedown the mouse must move before dragging should start.
-
[limit]Boolean optionalConstrains dragging to the width of the container
-
[offset_left]Offset_left optionalOffset added to the item that is being dragged.
-
[drag]Number optionalExecutes a callback when the mouse is moved during the dragging.
-
[start]Number optionalExecutes a callback when the drag starts.
-
[stop]Number optionalExecutes a callback when the drag stops.
-
Returns:
Object:
Returns
el.
