javascript auto hide navbar

Solutions on MaxInterview for javascript auto hide navbar by the best coders in the world

showing results for - "javascript auto hide navbar"
Darrel
23 Jan 2017
1$(window).click(function(e) {
2
3    if($(".navbar-collapse").hasClass("show")){
4       $('.navbar-collapse').removeClass("show"); 
5       e.preventDefault();
6       }
7});
8 
9$('.navbar-collapse').click(function(event){
10      event.stopPropagation();
11});
12
13// use 'navbar-collapse' on your navbar