<div class='container'>
<div class='element'>lorem ipsum</div>
<div class='element'>lorem ipsum</div>
<div class='element'>lorem ipsum</div>
<div class='element'>lorem ipsum</div>
</div>
$('.container').sortable({
stop: function(event, ui) {
ui.item.remove();
}
});
这样做但我只有在element
之外被拖动时才需要删除container
,如果它在container
内排序,则需要删除。
有什么想法吗?
答案 0 :(得分:1)
您只需在function ExportResults()
{
startDate=document.getElementById("Start_Date").value;
endDate=document.getElementById("End_Date").value;
$('#OrderTable').table2excel({
exclude: ".excludeThisClass",
name: "Excel Document Name",
filename: "Search Results (" + startDate + "-" + endDate + ")", //do not include extension
fileext: ".xls", // MUST use .xls extension, only this will work
});
}
中定义accept
,就像这样:
<强> jsfiddle 强>
<强> HTML 强>
droppable
<强>的JavaScript 强>
<div class="element">Drag me</div>
<div id="content">
<div class="container">
drop here (container)
</div>
</div>