Skip to content

Commit 9f3769c

Browse files
committed
Auto-close navbar upon menu item click
1 parent 4ff0f4c commit 9f3769c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

js/index.js

+6
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,10 @@ $(document).ready(function() {
2424
}
2525
})
2626
})
27+
28+
// Auto close navbar on clicking a link in it
29+
// Ref: https://stackoverflow.com/a/14250000/5614968
30+
$('.navbar-collapse a').click(function() {
31+
$(".navbar-collapse").collapse('hide');
32+
});
2733
})

0 commit comments

Comments
 (0)