SO CLOSE!  What I really need - is when the div collapses - is to HIDE
the unchecked items:

Isn't that what this does?
$(this).next('div:hidden').slideDown('fast').siblings('div:visible:not (:has(input:checked))').slideUp('fast');

It's showing the very next div, and then hiding any other sibling div that does not have a checked input. I must be misunderstanding something. In the html snippet you provided, you had one checkbox per div.details and one div.details per h3. Will there be multiple checkboxes inside a div.details? Will there be multiple div.details following each h3? If so, that could change the equation.

--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Nov 15, 2007, at 3:33 PM, Priest, James (NIH/NIEHS) [C] wrote:


-----Original Message-----
From: Karl Swedberg [mailto:[EMAIL PROTECTED]

$('div.demo-show:eq(0) ...

I doubt you'll need the :eq(0) part, and the "demo-show"
class was for a demo, so you can safely change that in the
HTML and match the change in the jQuery.

Yeah - I just wanted to keep it the same to make sure I wasn't messing
something up! :)

$(this).next('div:hidden').slideDown('fast').siblings('div:vis
ible:not(:has(input:checked))').slideUp('fast');

SO CLOSE!  What I really need - is when the div collapses - is to HIDE
the unchecked items:


Topics 1
0 item 1
0 item 2
0 item 3

Topics 2
Topics 3

So user selects

Reply via email to