Disable Html button with JQuery for a period -


i have html button, disable jquery, after clicked , after 10 seconds want enable it.

$('#test').click(function(){      $("#test").attr("disabled", true);      $('#test').html('bitte warten..<img src="<?=cdn('/icons/loading/loading5.gif')?>" />'); }); 

i have problems timer part. know there setinterval(function() {}, 5000); go on , over.

you can use settimout enable button after interval.

$('#test').click(function(){      $("#test").attr("disabled", true);      settimout(function(){          $("#test").attr("disabled", false);        }, 10000);        $('#test').html('bitte warten..<img src="<?=cdn('/icons/loading/loading5.gif')?>" />'); }); 

Comments

Popular posts from this blog

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -