私はいくつかのクリックイベントを私が持っているいくつかの画像にバインドしています.それらの1つがクリックされると、すべての画像を無効にしてから2秒後に同じクリックイベントを追加します.
これまでのところ、次のものがあります。
$('#pagination img').each(function(index){
$( this ).bind ("click",function(){
pageClick = true;
pagendex = index*9;
clearInterval(progresstracker);
$("#progressbar").progressbar( "option", "value", 0);
numSecondsPassed=0;
$('#pagination img').each(function(index){
$(this).unbind('click');
});
// alert("Page Index" + pageIndex);
rotateImage();
}).mouseover(function(){
$(this).css("cursor","pointer");
});
});
私はそれらをアンバインドしていますが、それは機能します.しかし、2秒後に同じ変数を使用してクリックイベントにバインドし、再度バインドを解除する必要があります.