disable click while fadeOut delay
I'm writing a little game and have to turn off the click function temporarely:
- $('.drag').click(function(){
$(this).children().show();
var myID = $(this).attr('id');
tempArray.push(myID);
if(tempArray.length == 2){ // turn click off
$('.drag').children().delay(1000).fadeOut(100); // after fading out turn click on again
tempArray.length = 0;
}
})
During the 1 second of the delay, clicking on class ('.drag) should be turned off.
After the delay the same click function should be turned on.
Thanks in advance, Henk