Change the data-target
to the correct element id. In your case #bs-example-navbar-collapse-1
is the element id you want:
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false" aria-controls="navbar">
solved My code dont works but I don’t know why [closed]