new Draggable(element, parent [, options])
Creates a new Draggable instance.
Parameters:
Name | Type | Argument | Description | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
element |
HTMLElement | The element to be made draggable |
||||||||||||||||||||||||||||||||||||||||||||||
parent |
HTMLElement | string | The parent element where the draggable container will be appended. Can be either an HTMLElement or a CSS selector string |
||||||||||||||||||||||||||||||||||||||||||||||
options |
Object |
<optional> |
Configuration options for the draggable element Properties
|
- Source:
Methods
-
appendChild(element)
-
Appends an HTML element to the draggable container and updates its position.
Parameters:
Name Type Description element
HTMLElement The element to append to the draggable container
- Source: