我與jQuery的排序(jQuery UI的)jQuery的排序當dropOnEmpty修復
根據默認dropOnEmpty = true
,並作爲加速我申請了connectwith
後我申請.sortable()
我的選擇如下:
<script type="text/javascript">
$('#selector1').sortable({
over: function(ev,ui){
console.log('Dragging over: '+$j(ui.placeholder).parent().parent().parent().attr('id'));
}
)};
$('#selector2').sortable({
over: function(ev,ui){
console.log('Dragging over: '+$j(ui.placeholder).parent().parent().parent().attr('id'));
}
)};
$('.ui-sortable').sortable('option', connectWith', '.ui-sortable');
</script>
我已經證明了我的日誌,試圖弄清楚發生了什麼事情 - 試想一下,從#selector1到#選擇器2(裏面是空的)我第一次拖 - 沒有滷味gging會出現,但是如果我將其拖回到源代碼中,則會收到日誌記錄,並且比拖回目標列時有效?
空選擇器甚至有ui-sortable
類,但它不連接!
在初始化connectWith
之後,我應該如何確保在應用connect-with時單獨列出空列表?
是否在原始代碼的最後一行缺少'''? – Jack
這只是'僞代碼' –