我有一系列标签,我想将标签拖放到表格列中。
我希望应该将David simmons标签拖放到经理行的Userinfo列中。我希望其他标签也应该拖放而不重复项目。标签不应失去其原始位置
$(function() {
$('.lblEmail').draggable({
cancel: "a.ui-icon", // clicking an icon won't initiate dragging
//revert: "invalid", // when not dropped, the item will revert back to its initial position
revert: true, // bounce back when dropped
helper: "clone", // create "copy" with original properties, but not a true clone
cursor: "move"
, revertDuration: 0 // immediate snap
});
// $(".lblEmail").draggable();
$(".tableDroppable tbody tr td").droppable({
accept: ".lblEmail",
drop: function(e, ui) {
var $item = ui.draggable.clone();
$(this).addClass('has-drop').html($item);
}
});
});