With the release of jQuery 1.6, the SO recommendation was to start with prop (), where you used attr ().
What happens when I want to make a readonly element?
$('.control').prop('readonly', 'readonly'); $('.control').prop('readonly', true);
None of them seem to do read-only control. Is a read-only item an exception to the rule?
ajbeaven May 05 '11 at 1:33 a.m. 2011-05-05 01:33
source share