This repository has been archived by the owner on Jul 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Menu does not open on mobile width #1
Comments
Have you tried refreshing the page after resizing the window? |
I'm a bit late to the party, but I only just discovered this Repo. Like an hour ago. /*
* 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.
Clicking the menu icon in Chrome does not open the menu
The text was updated successfully, but these errors were encountered: