From b143b4bdac04c9d5c62d300469c91256fb84a64a Mon Sep 17 00:00:00 2001 From: Lebedev Konstantin Date: Tue, 1 Jul 2014 16:43:35 +0400 Subject: [PATCH] + onStart/onEnd --- README.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 04323ee..d8e17da 100644 --- a/README.md +++ b/README.md @@ -30,16 +30,24 @@ new Sortable(elem, { handle: ".my-handle", // Restricts sort start click/touch to the specified element draggable: ".item", // Specifies which items inside the element should be sortable ghostClass: "sortable-ghost", + + onStart: function (/**Event*/evt) { // dragging + var itemEl = evt.item; + }, + + onEnd: function (/**Event*/evt) { // dragging + var itemEl = evt.item; + }, - onAdd: function (evt){ + onAdd: function (/**Event*/evt){ var itemEl = evt.item; }, - onUpdate: function (evt){ + onUpdate: function (/**Event*/evt){ var itemEl = evt.item; // the current dragged HTMLElement }, - onRemove: function (evt){ + onRemove: function (/**Event*/evt){ var itemEl = evt.item; } });