The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

Mobile Navigation Dropdown

  • # November 19, 2012 at 1:36 pm

    This reply has been reported for inappropriate content.

    modernizer’s mq function?

    # November 19, 2012 at 6:24 pm

    This reply has been reported for inappropriate content.

    Solved with:

    $(function() {
    $('#main-nav_responsive > > li > a').click(function(e) {
    $('#main-nav_responsive > ul.sub-menu').slideUp('normal');
    if($(this).next('#main-nav_responsive > ul.sub-menu').is(':hidden') === true) {
    $(this).next('#main-nav_responsive > ul.sub-menu').slideDown('normal');
    # November 20, 2012 at 1:46 am

    @JeremyEnglert : FYI, not sure if this is on purpose, but when hovering over results and contact on your main nav, there is no color but you still have drop downs..

    # January 20, 2013 at 11:23 pm

    Hey all –

    Thanks for posting this I’m using it for my mobile nav and it’s working great – the only thing I need help with is making sub-menus able to function – currently if I create a submenu and give it the same class as the parent list item (.menu) it re-collapses the entire menu when you click on it. I’m not very experienced with jquery, otherwise I would think it’s not that hard to do.

    Any help appreciated!

Viewing 4 posts - 16 through 19 (of 19 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed