I have an HTML that mounts DROPDOWN menu.
With JQUERY, I'm trying to make invisible items that have no sublists inside them.
I tried using the following command, but it did not work
$('ul li :not(ul)').hide()
;
HTML code:
<ul>
<li>
<a href="javascript:void(0)">Opção 1</a>
</li>
<li><a href="javascript:void(0)">Opção2</a>
<ul>
<li><a href="opcao_3.htm">Opção 3</a></li>
<li><a href="opcao_4.htm">Opção 4</a></li>
</ul>
</li>
<li>
<a href="javascript:void(0)">Opção 5</a>
</li>
<li><a href="javascript:void(0)">Opção6</a>
<ul>
<li><a href="opcao_3.htm">Opção 7</a></li>
</ul>
</li>
</ul>