Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

2 level navigation in wordpress

I am building a WordPress theme without using foundation or bootstrap which both have decent walkers on github. I am using Guil's Poly-UI and some custom CSS instead.

I need to create a dropdown something like this

<li class="dropdown nav__item">
    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Members <span class="caret"></span></a>
     <ul class="dropdown-menu is-collapsed" role="menu">
          <li><a href="#">Action</a></li>
          <li><a href="#">Another action</a></li>
          <li><a href="#">Something else here</a></li>
     </ul>

currently in normal HTML this is the trigger javascript

$('.dropdown-toggle').click(function() {
    $(this).next('.dropdown-menu').toggleClass("is-collapsed");
})

I've looked at a ton of walker examples and I'm not understanding it. I need to have a menu in wordpress with one level of dropdown menus.

Does anyone have any experiance with this?