Hey Jim,
I think I'm beginning to understand what you're trying to do here.
I'm a little slow. ;-)
When the user clicks on an h3, the following will happen:
1. all div.details with ALL checkboxes inside of them UNchecked will
show all of their checkboxes (and labels)
2. all other unchecked checkboxes (excluding those in #1) will be be
hidden
3. all checkboxes -- unchecked or checked, doesn't matter -- in the
div.details immediately following the clicked h3 will be shown
Let me know if I'm still not getting it. Otherwise, enjoy:
$(document).ready(function() {
$('div.topiclist h3').click(function() {
$(this).next().siblings('div.details').each(function() {
var $this = $(this);
var $children = $this.children();
if ( !$this.find('input:checked').length ) {
$children.show();
} else {
$children.not(':has(:checked)').hide();
}
})
.end()
.children('div:hidden').slideDown('fast');
});
});
--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Nov 16, 2007, at 9:23 AM, Priest, James (NIH/NIEHS) [C] wrote:
-----Original Message-----
From: Karl Swedberg [mailto:[EMAIL PROTECTED]
Isn't that what this does?
$(this).next('div:hidden').slideDown('fast').siblings('div:vis
ible:not(:has(input:checked))').slideUp('fast');
This is getting closer:
$(this).next('div:hidden').slideDown('fast').siblings().find
('input:chec
kbox').not(':checked').parent().hide();
But then it won't expand a .details with only unchecked items.
Jim