149
rated 0 times
[
154]
[
5]
/ answers: 1 / hits: 116262
/ 10 Years ago, tue, may 20, 2014, 12:00:00
How can I close an open collapsed navbar on clicking outside of the navbar element? Currently, the only way to open or close it is by clicking on the navbar-toggle
button.
See here for an example and code:
So far, I have tried the following which doesn't seem to work:
jQuery(document).click(function() {
});
jQuery('.navbar').click(function(event) {
jQuery(.navbar-collapse).collapse('hide');
event.stopPropagation();
});
More From » jquery