I want that after my button is clicked, it would be unclickable for a few seconds, how can I do it? I want to write a code for all buttons, not just for a one. So, I need something like that:
$(document).ready(function() {
$('input[type="button"]').click(function() {
$(this).css("hidden: true");
delay(3);
$(this).css("hidden: normal");
})
})
It is just a pseudo-code, could you give me a hand?
With jQuery…
jsFiddle.
Without jQuery…
Alternatively capture the clicks on a persistent ancestor element and check if they’re
input[type="button"]types. This prevents attaching multiple events for each element.