// Element is dropped into the list from another list
// Element is dropped into the list from another list
onAdd:function (/**Event*/evt){
onAdd:function (/*Event*/evt){
var itemEl = evt.item; // dragged HTMLElement
var itemEl = evt.item; // dragged HTMLElement
itemEl.from; // previous list
itemEl.from; // previous list
},
},
// Changed sorting within list
// Changed sorting within list
onUpdate:function (/**Event*/evt){
onUpdate:function (/*Event*/evt){
var itemEl = evt.item; // dragged HTMLElement
var itemEl = evt.item; // dragged HTMLElement
},
},
// Called by any change to the list (add / update / remove)
// Called by any change to the list (add / update / remove)
onSort:function (/**Event*/evt){
onSort:function (/*Event*/evt){
var itemEl = evt.item; // dragged HTMLElement
var itemEl = evt.item; // dragged HTMLElement
},
},
// Element is removed from the list into another list
// Element is removed from the list into another list
onRemove:function (/**Event*/evt){
onRemove:function (/*Event*/evt){
var itemEl = evt.item; // dragged HTMLElement
var itemEl = evt.item; // dragged HTMLElement
},
},
onFilter:function (/**Event*/evt){
onFilter:function (/*Event*/evt){
var itemEl = evt.item; // HTMLElement on which was `mousedown|tapstart` event.
var itemEl = evt.item; // HTMLElement receiving the `mousedown|tapstart` event.
}
}
});
});
```
```
...
@@ -118,7 +118,7 @@ You can also define whether lists can give away, give and keep a copy (`clone`),
...
@@ -118,7 +118,7 @@ You can also define whether lists can give away, give and keep a copy (`clone`),
* name:`String` — group name
* name:`String` — group name
* pull:`true|false|'clone'` — ability to move from the list. `clone` — copy the item, rather than move.
* pull:`true|false|'clone'` — ability to move from the list. `clone` — copy the item, rather than move.
* put:`true|false|["foo", "bar"]` — whether elements can be added from other lists, or an array of group names from which elements can be taken
* put:`true|false|["foo", "bar"]` — whether elements can be added from other lists, or an array of group names from which elements can be taken. Demo:http://jsbin.com/naduvo/2/edit?html,js,output
---
---
...
@@ -227,7 +227,7 @@ Sortable.create(el, {
...
@@ -227,7 +227,7 @@ Sortable.create(el, {
/**
/**
* Get the order of elements. Called once during initialization.
* Get the order of elements. Called once during initialization.