0
首先道歉,如果這已經堆棧溢出。我有3個塊,其中一個塊需要被拖入目標段。不幸的是,當我拖動代碼執行的3個塊中的任何一個時。如果用戶拖動不正確的塊,我只是希望它什麼都不做。我是新來的編碼,但從我讀了以下內容:問題與jQuery接受
accept: "#Proof";
應該工作,但它似乎不是。非常感謝幫助。請注意,我必須在jQuery中執行此操作,因爲它適用於教育項目。
非常感謝
$(".drop").draggable();
$("#Proof").draggable();
$("#target").droppable({
accept: "#Proof";
drop: function (event, ui){
$("#Proof").html("Success!!<br> Please now press submit");
$("#target").css("background-color", "#00cc00");
$(".falseTarget").css("background-color", "#00cc00");
$(".drop").hide();
$("#Proof").draggable('disable');
}
});