My menu does not open on click and cant understand why. Checked alot of posts in stackoverflow and around the web, but still cant figure it out. The question might be pathetic, but i am still newbie in bootstrap.
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
<header>
<div class="navbar navbar-default navbar-fixed-top text-uppercase">
<div class="container">
<div class="navbar-header">
<a href="index.html" class="navbar-brand">My Blog</a>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-targert=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#">Register</a>
</li>
<li>
<a href="#">Login</a>
</li>
</ul>
</div>
</div>
</div>
</header>
<footer></footer>
Will appreciate any advice! Thank you!
2
Answers
here is example of dropdown toggle menu for you:
You made a typo: it should be “data-target”, not “data-targert” 🙂
After this change, it worked for me!