2
I would like to know why the bootstrap menu on mobile devices does not close when clicking on the menu. It opens normally, but if the user wants to close, it does not close.
Access link: www.paddock.eco.br
Menu Code:
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<nav id="topNav" class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="navbar-collapse collapse" id="bs-navbar">
<ul class="nav navbar-nav">
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">SERVIÇOS <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#one">Detalhamento Automotivo</a></li>
<li><a href="#two">Polimento Paddock</a></li>
<li><a href="#three">Pacotes Carro</a></li>
<li><a href="#four">Pacotes Moto</a></li>
</ul>
</li>
<li>
<a class="page-scroll" href="#last">Contatos</a>
</li>
</ul>
</div>
</div>
</nav>
1° part of the menu above the one I posted above. <nav id="topNav" class="navbar navbar-default navbar-fixed-top">
 <div class="container-fluid">
 <div class="navbar-header">
 <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-navbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div>
– Renan Bessa
You can edit your reply and put that code in your comment...
– MagicHat
What version of jQuery are you using? Actually the class toggle
navbar-collapse collapse in
in the elementbs-navbar
seems to be bug - the classcollapse in
does not maintain the change tocollapse out
.– BrTkCa
Sets the data-target to data-target=". Collapse" and can delete id="Bs-navbar"
– denis
@Renanbessa edit your question and put as answer along with the code to have an easy understanding.
– Mike Otharan