responsive-nav.js
responsive-nav.js copied to clipboard
Any fixes for WordPress
WordPress adds a div around the list items and I think that confuses the js.
Any way to make this work?
I use Responsive Nav in several WordPress Themes but haven't noticed any problems. Can you link to your site or describe to problems you have.
Well everything is the same as on our non-wp site, except the html have the wp menu instead of just a ul.
What else should I change from a standard site to a wp site? The js loads just fine and seems to be working, it's just not showing the .nav-collapse and we suspect it's because of the div wp puts around the ul...
You should remove the div container that WordPress creates by setting container to false.
<?php wp_nav_menu( array( 'container' => false ) ); ?>
My code is below. When I collapse the menu, I don't get any orange hamburger. I should since I'm using the 'advanced' demo CSS and JS.
<nav class="nav-collapse">
<?php wp_nav_menu( array( 'menu-1' => 'Primary Menu', 'container' => false ) ); ?>
</nav>
Also, how does this code deal with submenus? It doesn't seem like it will work.