not sure, but this works, too:

$(":checkbox[checked]")


--Karl

____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Dec 31, 2008, at 6:29 AM, Andy Fish 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