The sortable component make you able to change the order of a list.
The list can be an <ul>
, <ol>
, <div>
or <tbody>
tag.
Each children must have a draggable="false"
attribute. The attribute will be changed when drag start.
You can decide which part of the item is draggable with the data-handle="sortable"
attribute
To enable this component you need to import the javascript file and create a new Sortable object.
Method | Description |
---|---|
resetEvents() |
This method will reset the items and events |
Event | Description | Value |
---|---|---|
sortable:drag |
This event is fired when the you start dragging an item |
|
sortable:drop |
This event is fired when the you drop an item |
|