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
Post a Comment