On Dec 31, 2008, at 4:58 PM, Ricardo Tomasi wrote:
In XHTML the correct value for the checked attribute is 'checked', not
'true'.
<input type="checkbox" checked="checked" />
Sure, but JavaScript returns true (boolean) for the checked attribute.
Do this in Firebug:
$('input:checked').attr('checked')
or this
$('input:checked')[0].checked
and it'll report true, not 'checked'.
Of course, as you and Dave both pointed out, Andy was trying to match
elements with checked attribute equal to the string 'true'. I had
missed that. D'oh.
--Karl
____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com