In XHTML the correct value for the checked attribute is 'checked', not
'true'.

<input type="checkbox" checked="checked" />

On Dec 31, 9:29 am, Andy Fish <ajf...@blueyonder.co.uk> wrote:
> Hi,
>
> I was trying to select for checked checkboxes so I tried
> $(":checkbox[checked=true]")
>
> this never returns anything, even though if I select all checkboxes I
> can test "this.checked" for each one and it returns true/false as
> appropriate.
>
> I now understand that I can to :checkbox:checked, but I don't
> understand why my original approach doesn't work, since clearly each
> checkbox has an attribute 'checked' which has the value true or false.
>
> Andy

Reply via email to