Use true
instead of disabled
:
$("input").attr("disabled", true);
Working example: http://jsfiddle.net/bEC8L/ (input is set to disable after 5 seconds)
jQuery sets properties instead of attributes if the given attribute is actually a property name, and "disabled"
isn't a valid value for the disabled
property.
Andy E
2010-06-01 18:03:09