Most Popular
Collapse And Expande Code using Jquery?
Disable/enable a form element using jQuery?
There are two ways to disable/enable form elements. Set the 'disabled' attribute to true or false: // Disable #x $('#x').attr('disabled', true); // Enable #x $('#x').attr('disabled', false); Add or remove the 'disabled' attribute: // Disable #x $("#x").attr('disabled', 'disabled'); // Enable #x $("#x").removeAttr('disabled');