Skip to content
This repository has been archived by the owner on Jul 29, 2020. It is now read-only.

Menu does not open on mobile width #1

Open
joeldom opened this issue Oct 12, 2012 · 2 comments
Open

Menu does not open on mobile width #1

joeldom opened this issue Oct 12, 2012 · 2 comments

Comments

@joeldom
Copy link

joeldom commented Oct 12, 2012

Clicking the menu icon in Chrome does not open the menu

@saddam-azad
Copy link
Owner

Have you tried refreshing the page after resizing the window?

@RobertinoValue
Copy link

I'm a bit late to the party, but I only just discovered this Repo. Like an hour ago.
Bumped into this same issue. Resolved it by changing script.js like this :
Soft-deleted the visibility check for the hamburger menu icon.
Re-Added the exact same check withinthe 2 event handlers it was at first containing :

    /*
    *   Applicable only to Mobile-nav
    */

        // Checking if the top-right button is visible.
        //SOFT-DELETE: if ($("nav a.btn-navbar").is(":visible")) {

            // Making the dropdown magically appear onclick/touch.
            $('nav a.btn-navbar').on('click', function() {
                if ($("nav a.btn-navbar").is(":visible")) { //RE-ADDED HERE
                    $('ul#menu').slideToggle('fast', function() {
                        $('ul#menu').css({

                            // The height must be fixed for the native scrolling on iOS
                            'height': $(this).height(),

                            // But we don't want the height of the nav to exceed the viewport.
                            'max-height': $(window).height() + 20
                        });
                    });
                }

                $(this).toggleClass('active');

            }); // end on.click

            // Making the children appear on click/touch
            $('ul#menu li.hasChildren a').on('click', function() {
                if ($("nav a.btn-navbar").is(":visible")) { //RE-ADDED HERE
                    $(this).parent().children('ul').slideToggle('fast', function() {

                        $('ul#menu').css({

                            // Resetting the height to auto in order to expand/contract the menu upon interaction.
                            'height': 'auto',

                            // But we don't want the height of the nav to exceed the viewport.
                            'max-height': $(window).height() + 20
                        });

                    }); // end slideToggle
                }

            }); // end on.click

        //SOFT-DELETE: } // end visibility check

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants