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

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -