I am trying to disable multiple clicks on element or set a delay between each click to prevent content overloading
I am thinking to do something like this:
var clicked = false;
if(!clicked)
{
clicked = true;
// do all my stuff right here !!
setTimeout(function(){
clicked = false;
}, 3000);
}
But it's not working. Can anyone offer any suggestions?
you can disable element
$(element).prop('disabled', true);
after clicking it
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With