Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Select a Parent Element whose Children are Hidden Reply To: Select a Parent Element whose Children are Hidden

#175962
JaffarKhan
Participant

Hi All,
Thanks for the Reply,

Reply @ Paulie_D: Yes, I want to hide a Parent if its children are hidden.

Reply @ MattDiMu: I need Jquery Solution as there is no CSS selector for parent element yet. Thanks for Solution.

And i just myself found a solution please checkout :
I’ve used length as ‘2’ coz i have only two children in this case :)

$('.CLRow').each(function () {
            if ($(this).children(':hidden').length == 2){ 
                $(this).hide(); }
            });