All, I knew we can implement a draggable to a element just simply call the .draggable
method in jquery ui.
here is an example for it including connect to sortable.
$(".draggable").draggable({
helper : function(){
//return something dom.},
cursor : 'move',
connectToSortable : '.sortableLayoutSection'});
$(".sortableLayoutSection").sortable({
appendTo : parent,
containment : "parent",
cursor : "pointer",
placeholder : 'li-placeholder',
forcePlaceholderSize : false
});
But my question is how can I known the draggable item really drop into the specified container(in this example is element with class named .sortableLayoutSection
)? thanks.
Updated
$(".sortableLayoutSection").sortable({
appendTo : parent,
containment : "parent",
cursor : "pointer",
placeholder : 'li-placeholder',
forcePlaceholderSize : false,
receive: function( event, ui ) {alert('ok.got something.')}
});