我得承认,我几乎是一个菜鸟,但我一直在努力解决这个问题。我必须if
在两次下降发生后触发,现在它在加载时触发。我在那里想念什么?
$(function() {
$( "#draggable" ).draggable({
revert: "invalid",
snap: "#droppable",
});
$( "#droppable" ).droppable({
accept: "#draggable",
drop: function() {
$("#whistle").get(0).play();
$(this).data(droppable)
}
});
$( "#draggable2" ).draggable({
revert: "invalid",
snap: "#droppable",
});
$( "#droppable2" ).droppable({
accept: "#draggable2",
drop: function() {
$("#whistle").get(0).play();
$(this).data(droppable2)
}
});
if ($.queue(2)) {
$("#whistle2").get(0).play();
alert ("done!")
}
});