Reputation: 3057
When trying to adjust to Bootstrap 3, I have encountered the following problem.
When I click on the button named F
, I would like Home
and Not Home
to show up, but it does not at the moment.
This is the video I am learning from.
<div class= "navbar navbar-inverse navbar-static-top">
<div class="container">
<a class= "navbar-brand">Jackdh</a>
<button class="navbar-toggle" data-toggle="collapse" data-target=".navHeaderCollapse"> F
</button>
<div class ="collapse navbar-collapse navHeaderCollapse">
<ul class = "nav navbar-nav navbar-right">
<li><a href="#">Home</a></li>
<li><a href="#">Not Home</a></li>
</ul>
</div>
</div>
</div>
Upvotes: 2
Views: 8166
Reputation: 65
@op (original poster)
Marcel's answer gave me a clue so I checked my script tag
<script src="bootstrap.min.js"></script>
I forgot to add the bootstrap javascript folder "js/"
With this script tag everything works fine.
<script src="js/bootstrap.min.js"></script>
@ Marcel - I couldn't vote up your answer due to lack of reputaion!
Upvotes: 2
Reputation: 1
You forgot to add navbar-header div after container, Try this one !
` Brand
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navHeaderCollapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>`
Upvotes: 0
Reputation: 8520
I'm pretty sure that you simply forgot to add bootstrap.js
and also jquery
.
With that included, everything works for me.
Upvotes: 8