From d1f3fe382e1b5d52ce3fba9769596c93585ea120 Mon Sep 17 00:00:00 2001 From: lukeIam <2lukeiam@gmail.com> Date: Sat, 2 Sep 2017 11:35:57 +0200 Subject: [PATCH] Fix: mobile menu stays open after a navigation click and blocks most parts of the gui --- js/main.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/main.js b/js/main.js index bc038bed..04651c74 100644 --- a/js/main.js +++ b/js/main.js @@ -42,3 +42,10 @@ $(".blue-bg .btnDownload").click(function() { $(".blue-bg .card-overlay .close-icon").click(function () { hideCard($(".blue-bg .card-overlay")); }); + +// Close menu after click (on mobile) +$(document).on('click','.navbar-collapse.in',function(e) { + if( $(e.target).is('a') && $(e.target).attr('class') != 'dropdown-toggle' ) { + $(this).collapse('hide'); + } +}); \ No newline at end of file