skip to Main Content

Auto close Navbar when click on link (responsive mode)-Twitter bootstrap

$('.navbar-collapse a').click(function() { $(".navbar-collapse").collapse('hide'); }); <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" /> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <nav class="navbar navbar-default fixed-top navbar-expand-md navbar-light shadow-sm"> <div class="container"> <!-- <nav class="navbar navbar-default navbar-fixed-top rhgh-fixed-top"> <div class="container"> //--> <a class="navbar-brand" href="#home"> <i class="fa fa-home"></i>&nbsp;Resthaven Guesthouse </a> <button class="navbar-toggler" type="button"…

VIEW QUESTION

how to image center in Navbar Responsive?-Twitter bootstrap

It's My code navbar <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.3/js/bootstrap.min.js"></script> <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.0/css/bootstrap.min.css" rel="stylesheet" /> <body class="bg-dark"> <nav class="navbar navbar-expand-lg navbar-dark "> <div class="container"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarText" aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse " id="navbarText"> <ul class="navbar-nav…

VIEW QUESTION
Back To Top
Search