Answers for "javascript auto hide navbar"

1

javascript auto hide navbar

$(window).click(function(e) {

    if($(".navbar-collapse").hasClass("show")){
       $('.navbar-collapse').removeClass("show"); 
       e.preventDefault();
       }
});
 
$('.navbar-collapse').click(function(event){
      event.stopPropagation();
});

// use 'navbar-collapse' on your navbar
Posted by: Guest on September-11-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language