Try this

$('h3').click(function() {
  
$(this).next('.details').find("input:checkbox").not(":checked").parent().hide();
});


Feijó


----- Original Message ----- 
From: "Priest, James (NIH/NIEHS) [C]" <[EMAIL PROTECTED]>
To: <jquery-en@googlegroups.com>
Sent: Wednesday, November 14, 2007 4:56 PM
Subject: [jQuery] hiding checkbox AND label?



Argh - I'm close - but so far I can't seem to hide BOTH the checkbox and
label:

$('h3').click(function() {
$(this).next('.details').find("input:checkbox").not(":checked").hide();
});

OR

$('h3').click(function() {
$('input:checkbox').each(function() {
if (!this.checked)
    {
      $(this).next().hide();
    }
});
 });

Both hide the checkbox only. The label remains!!

I've tried a few things with parent().next() but either I can remove the
checkbox OR the label but never both??

I'm sure I'm missing something simple here????

Thanks,
Jim

Reply via email to