You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Element is dropped into the list from another list
56
56
onAdd:function (/**Event*/evt){
57
57
var itemEl =evt.item; // dragged HTMLElement
58
58
itemEl.from; // previous list
59
59
},
60
60
61
-
// Changed sorting in list
61
+
// Changed sorting within list
62
62
onUpdate:function (/**Event*/evt){
63
63
var itemEl =evt.item; // dragged HTMLElement
64
64
},
@@ -68,7 +68,7 @@ var sortabel = new Sortable(el, {
68
68
var itemEl =evt.item; // dragged HTMLElement
69
69
},
70
70
71
-
//The element is removed from the list
71
+
//Element is removed from the list into another list
72
72
onRemove:function (/**Event*/evt){
73
73
var itemEl =evt.item; // dragged HTMLElement
74
74
},
@@ -79,13 +79,13 @@ var sortabel = new Sortable(el, {
79
79
});
80
80
```
81
81
82
-
83
82
---
84
83
85
84
86
85
#### `handle` option
87
-
88
-
To make list items draggable, Sortable disables text selection by the user. That's not always desirable. To allow text selection, define a drag handler, which is an area of every list element that allows it to be dragged around.
86
+
To make list items draggable, Sortable disables text selection by the user.
87
+
That's not always desirable. To allow text selection, define a drag handler,
88
+
which is an area of every list element that allows it to be dragged around.
89
89
90
90
```js
91
91
var sortable =newSortable(el, {
@@ -110,7 +110,9 @@ var sortable = new Sortable(el, {
110
110
---
111
111
112
112
113
-
### `group` option
113
+
#### `group` option
114
+
To drag elements from one list into another, both lists must have the same `group` value.
115
+
You can also define whether lists can give away, give and keep a copy (`clone`), and receive elements.
114
116
115
117
* name:`string` — group name
116
118
* pull:`true|false|'clone'` — ability to move from the list. `clone` — cloning drag item when moving from the list.
@@ -119,6 +121,7 @@ var sortable = new Sortable(el, {
0 commit comments