, :
draggable. , , (li), . fcbkcomplete. , , . ui-state-default ,
$("#draggable").draggable({
distance: 10,
cursor: "move",
helper: function (e, ui) {
var newListItem = $(this).find('.bit-box').first().clone().removeClass().addClass("ui-state-default");
var fullCommand = "";
$(this).find('.bit-box').each(function( index ) {
fullCommand += $(this).text() + " ";
});
newListItem.text(fullCommand);
return (newListItem);
},
revert : true
});
droppable drop, , ui.helper.clone ui.draggable.
$("#container").droppable({
accept: '.product',
drop: function (event, ui) {
var x = ui.helper.clone();
x.removeClass().attr('style', '');
x.addClass("ui-state-default");
x.appendTo('#container');
ui.helper.remove();
}
});
, wrt css, , :)