Answer the question
In order to leave comments, you need to log in
How to hide div if inside div is empty?
Can't figure out how to hide div.spoiler-wrap if div.spoiler-body is empty?
<div class="spoiler-wrap disabled">
<div class="spoiler-head">Пример</div>
<div class="spoiler-body">
Это компания элона
</div>
</div>
Answer the question
In order to leave comments, you need to log in
There are 2 options .
1) If you receive information from the back, do not display the block if there is no information in it
2) If the state changes dynamically, then use js to hide
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question