2012-08-28 23 views

回答

0

這個簡單的版本不是你想要的嗎?

$(".droppable").sortable({ 
    revert: true, 
    receive: function (event, ui) { 
     var e = $(this).data().sortable.currentItem; 
     $(this).append(e); 
    } 
}); 

$(".draggable").draggable({ 
    connectToSortable: ".droppable", 
    helper: "clone", 
    revert: "invalid" 
});​ 

嘗試在這裏:

http://jsfiddle.net/vMnQM/2/

+0

我也希望能夠拖動跨度拖動到.section當.section在.droppable – user1167466

+0

哦。我認爲那是你的錯誤。 – samura

+0

這是我的另一個嘗試。 http://jsfiddle.net/dan2012/vtgts/ – user1167466