Answer the question
In order to leave comments, you need to log in
Check an element for the presence of a specific child and hide the parent if the element is not found?
Hello, I have this code:
<section class="main-text">
<div class="container">
<div class="row">
<h3>Заголовок</h3>
</div>
</div>
</section>
if ($(".main-text:not(:has(.children(h3)))") ) {
$(".main-text").hide();
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question