1
ユーザーがアイテムをドロップしたときにエフェクトを実行します。これどうやってするの?エフェクト「バウンス」を使いたいとしましょう。Jquery - 要素がドロップされたときの効果の実行方法
var drop1 = 1;
var drop2 = 2;
var liit = 3;
var counter = 0;
$('.container').droppable({
accept: '.item',
drop: function(event, div) {
counter++;
// here I would like to put a function that
// the dropped element bounces up and down before the alert.
if (counter == hit1) {
alert("You dropped on item");
}
else if (counter == hit2) {
alert("You dropped another item");
}
}
});
あなたは今、あなたの問題を解決しましたか? – eeya