Hi Jim,
Forgive me if you've already posted it, but would you mind showing us
the HTML? Labels can wrap around an input, but they don't have to, so
seeing what the relationship is between the label and the input
(checkbox) would help tremendously.
Thanks,
--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Nov 14, 2007, at 1:56 PM, Priest, James (NIH/NIEHS) [C] wrote:
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