I am building a website with a second level navigation with a fair whack of divs and styles applied to it. The problem is, there are some pages with no child pages so the subnav is empty and looks a bit odd.
I could not manage to find a simple script to remove html.
This is the code I want to remove:
<div class="sub_nav"><div class="track_nav_style_1">
<div class="track_nav_links">
<ul></ul>
</div>
</div></div>
I really hope I got you right, and if so, I suggest using a simple jQuery script.
Include the following in your
<head>section.The following script will remove the
<ul>container if there are no<li>below.