3
私はコメント内で達成したいコードのスニペットを追加しました。クリック後のJqueryの遅延、別の選択を可能にする
9つのボタンがあり、クリックされたボタンのデータID値が必要ですが、ユーザーがボタンをクリックして別のボタンをクリックするとすぐに決定できるので、最後にクリックしたボタン。
$('#add-shot a.btn').on('click', function(e) {
e.preventDefault();
// delay for 1500
// if no other button is clicked, then simply use $(this).data('id');
// else,
// if other button is clicked, don't use original data-id but use the new data-id
var id = $(this).data('id');
// run the rest of the code
});
は完璧な作品、ありがとう – user537137