":checked" should work, in compination with is(":checked");

$(this).is(":checked").length ? alert("yes") : alert("no");

or something like this, try around
or to highlight 

$(".checklist :checked").highlight();




Sean O wrote:
> 
> Hi,
> 
> 
> I have a "checklist" comprised of 8 checkboxes in a table, all with the
> class "checklist".
> 
> I'm pulling the values from a database, and I want to highlight the
> containing TDs green for the checkboxes that are checked, and leave the
> rest alone.
> 
> I can do this onclick:
>       $(".checklist").click(function(){
>               ($(this)[0].checked) ? 
> ($(this).parent().css("background","lightgreen"))
> : ($(this).parent().css("background","none"));
>       });
> 
> Advice?
> 
> Thanks,
> 
> ________
> SEAN O
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/how-to-tell-if-checkbox-is-checked-and-manipulate-tf3082108.html#a8563817
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to