Added additional responsive menu close logic

This commit adds JavaScript to close the responsive menu when a user clicks/taps outside of the open menu.
This commit is contained in:
Patrick MacMannis 2015-04-06 06:51:44 -04:00
parent 3f9c8e2eea
commit 3f694e4cb6

View File

@ -24,3 +24,10 @@ $('body').scrollspy({
$('.navbar-collapse ul li a').click(function() {
$('.navbar-toggle:visible').click();
});
// Closes the Responsive Menu on Click outside Menu
$('header, section, aside, footer').click(function() {
if(!$('button.navbar-toggle').hasClass('collapsed')) {
$('.navbar-toggle:visible').click();
}
});