Home › Forums › JavaScript › Select a Parent Element whose Children are Hidden › Reply To: Select a Parent Element whose Children are Hidden
July 20, 2014 at 11:07 pm
#175962
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(); }
});