From 595a36c502df01fac71b521b0a08df715d2d89a0 Mon Sep 17 00:00:00 2001 From: Javier Cejudo Date: Wed, 27 Aug 2014 22:34:18 +1000 Subject: [PATCH] fix(nav): clicking anywhere when the nav is hidden no longer opens the menu --- assets/js/_main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/assets/js/_main.js b/assets/js/_main.js index 5d8dccc..63fbc52 100644 --- a/assets/js/_main.js +++ b/assets/js/_main.js @@ -16,7 +16,9 @@ var navigation = responsiveNav("#site-nav", { // Selector: The ID of the wrapper $('html').click(function() { //Hide the menus if visible - navigation.toggle(); + if ($(navigation.wrapper).hasClass('opened')) { + navigation.toggle(); + } }); $('#site-nav').click(function(event){ @@ -49,4 +51,4 @@ $(document).ready(function() { // make it unique to apply your CSS animations just to this exact popup mainClass: 'mfp-fade' }); -}); \ No newline at end of file +});