I have a drop-down menu, where there are items of one type, and items of another type, approximately in this form each item:
<li> Категория <ul> <li class="type1">Пункт тип 1</li> <li class="type2">Пункт тип 2</li> </ul> </li> And I put 2 buttons so that each of them hides one of the field types. But there are points in which there is only one type, and it would be desirable that if there are no visible child points at the parent point, then it would also be hidden. How can this be achieved in jquery?