Disabling a button on a webpage using jQuery is remarkable simple – just set the selected button’s disabled attribute to true, in other words, make use of a .attr(‘disabled’,true) function call.
This can then obviously be extended to disabling all buttons on a webpage using the following snippet of code:
$('input[type=button]').attr('disabled', true);
Like I said, remarkably simple. (Obviously to enable you simply set the attribute to false again!)
Related Posts :
Checking and unchecking, or ticking and unticking if you prefer, checkboxes using jQuery is rema ...
Providing functionality to check all, uncheck all or even to invert the checkboxes currently sel ...
A very clever little jQuery function here that I've gone and lifted from some deep, dark domain ...
Sometimes it is nice to present a multiple select listbox to a user with everything already sele ...
You'll often find yourself using frameworks that may be running a number of different javasc ...






