From ab709b924db134eeb3c60ffe4a5ff8302da510e9 Mon Sep 17 00:00:00 2001 From: Peter McAtominey Date: Tue, 30 Jul 2013 23:46:27 +0100 Subject: [PATCH] Javascript workaround for mobile nag bar --- js/custom.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/js/custom.js b/js/custom.js index 525b0f0..11020d4 100644 --- a/js/custom.js +++ b/js/custom.js @@ -7,4 +7,17 @@ $(function() { // Bootstrap Table Class $('table').addClass('table'); + + var mobileNavWorkaround = function() { + if($(window).width()< 768) { + $('#sub-nav-collapse').css('height', '0px'); + } else { + $('#sub-nav-collapse').css('height', 'auto'); + } + } + + $(window).resize(function() { + mobileNavWorkaround(); + }); + mobileNavWorkaround(); }); \ No newline at end of file