My web application features drag and drop functionality allowing users to drag a div and dynamically drop it onto a droppable area. Additionally, the droppable area has sortable functionality enabled. Now, I need to determine the indexing in order to accurately pinpoint the position of a specific div after sorting. Below is the relevant code snippet:
$('#workArea').sortable({cancel: ':input,button,.common'});
$(".drags").draggable({
helper : "clone",
connectWith: '.workArea'
});
$(".workArea").droppable({
drop: function( event, ui ) {
function createHead(workspace){
var head = document.createElement("div");
}
// [editor] i believe there might be a missing } or an error in my paste
});