Reputation: 33
I have a minor display issue with my sortable divs. When the order of the divs change, a select box that reflects the order of the divs also changes (this all works fine).
But when a div is dragged again after moving from it's start position, the select box displays the original value rather than the most recent value.
I've already tried the refresh sortable function and from looking at the api I'm not sure what else could work
$('#itemWellHolder').sortable('refresh');
$('#itemWellHolder').sortable('refreshPositions');
Here is a JSfiddle demo, http://jsfiddle.net/Yq5u6/5/
Just drag item one to a different position then pick up again to duplicate.
Thanks for reading!
update: Removing the clone helper fixed this
$('#itemWellHolder').sortable({
placeholder: "ui-state-highlight",
helper: 'clone',
update: function( event, ui ) {}
});
Upvotes: 1
Views: 136
Reputation: 33
Removing the helper clone when initializing the sortable solved this.
$('#itemWellHolder').sortable({
placeholder: "ui-state-highlight",
helper: 'clone',
update: function( event, ui ) {}
});
Upvotes: 1