For anyone searching for similar answers, I've since learnt that this works
too:

$("#testDiv:not([input:checked])").hide();

The explanation (courtesy of Dave Methvin):

#testDiv            // select an element with id=testDiv
   :not(                      // as long as the following is not found:
     [                         // descendent elements containing
      input                     // an input
       :checked    // that is checked
     ])

Notice that it's _very_ important to put the :not right after the id name.
If there was a space after the id it would select _descendants_ of
#testDiv that do not contain input:checked.



-- 
View this message in context: 
http://www.nabble.com/Hide-div-only-if-no-child-checkbox-is-selected-tf2817380.html#a7944493
Sent from the JQuery mailing list archive at Nabble.com.


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

Reply via email to