I want to sort my items before I drop it.
this is my code
$(function () {
$('.box').draggable({
revert: true
});
$('.dest').droppable({
accept: '.left .box',
drop: function (event, ui) {
$newElt = $('<div class="box"></div>');
$newElt.appendTo(this);
}
});
$(".dest").sortable();
});
this is a JSFiddle.
this is like what I want to do (Example)