I have modified some code I found to try and achieve a 100% width drop down for my wordpress menu.
My issue is that my wordpres menu has a structure like this with the sub menu ul nested within the list for my nav.
<li><a href="">menu-1</a>
<ul class="sub-menu">
<li>sub 1</li>
<li>sub 2</li>
</ul>
</li>
The dropdown will only work if my sub menu is not nested within the top level navigation list like this.
<li><a href="">menu-1</a> </li>
<ul class="sub-menu">
<li>sub 1</li>
<li>sub 2</li>
</ul>
My fiddle of the drop working on menu 1 and not working on menu 2
Please advise how to resolve this, how can i change my wordpress menu structuure or preferably how can i change my script so that the drop down works with the current html structure.
Javascript isn't something I am experienced in, so some clear expertise wold be helpful.