Jquery ui Sortable clone items with data
I am using draggable with connectToSortable. When I clone the sortable items data is not cloned .I need to copy the data from target to source on receive event.
Is this a bug are this is the way sortable works?
And also $(this).data().uiSortable is working in some version and $(this).data().Sortable is working in older version . So how to handle this in plugins
- this.element.find(".edit_component").sortable({
connectWith: ".edit_component",
opacity: .35,
handle: ".drag",
receive: function (ev, ui) {
var $target = $(this).data().uiSortable.currentItem;
var $source = $(ui.sender);
// now you can copy data from source to target
$target.find('.row').data('colsize-index',$source.find('.row').data('colsize-index'));
}
});
B L Praveen
Web Developer