I have to disable button when page is loading ,,after full loading page i a have to enable using jquery or javascript how to do?
views:
38answers:
1
+2
A:
Disable any button from the beginning:
<input type="button" disabled="disabled" />
And add the enable to window ready function
$(document).ready(
function(){
$("input[type=button]", "<input[type=submit]", "input[type=reset]").each( //add more selector here if you want
function(){
if($(this).attr("disabled"))
$(this).attr("disabled", false); //enable button again
}
);
}
);
Bang Dao
2010-08-09 07:41:00
Shouldn't it be $(window).load ?
Charlie boy
2010-08-09 07:57:33
Thank. I use $(document).ready instead of $(window).load
Bang Dao
2010-08-09 08:23:52