I have a UL list with a much of li’s
i am using
$( "#group" ).sortable({
start: function(event, ui) {
},
stop: function(event, ui) {
enableSave();
}
});
What i would like to do is–> if the person starts to move the LI and decides to put it back NOT to call enableSave();
I thought i could save event.pageX and pageY and then check on the stop , but although the item is put back in the same place that value is never exactly the same
I am sure there is a correct way to do this
thanks
Use
.index()to get the index of theliin theul. Store the startingindexon start and then compare it to the index at the end. If it’s the same, it ain’t moved 🙂