diff --git a/README.md b/README.md index 342506f..b29b244 100644 --- a/README.md +++ b/README.md @@ -45,14 +45,17 @@ new Sortable(el, { onStart: function (/**Event*/evt) { /* dragging */ }, onEnd: function (/**Event*/evt) { /* dragging */ }, + // Element is dropped into the list from another list onAdd: function (/**Event*/evt){ var itemEl = evt.item; // dragged HTMLElement }, + // Changed sorting within list onUpdate: function (/**Event*/evt){ var itemEl = evt.item; // dragged HTMLElement }, + // Element is removed from the list into another list onRemove: function (/**Event*/evt){ var itemEl = evt.item; // dragged HTMLElement }, @@ -63,6 +66,12 @@ new Sortable(el, { }); ``` +### group + +To drag elements from one list into another, both lists must have the same `group` value. + +In the [upcoming dev version](https://github.com/RubaXa/Sortable/tree/dev), you can also define whether lists can give away, give and keep a copy (clone), and receive elements. + #### handle 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.