Twitter Bootstrap Tabbable Navbar
I'm using twitter bootstrap to create a navbar at the top of my page. I
want the nav elements to work like tabs instead of links. I see that
others have been able to achieve this, but I am still not able.
I'm following this section of the documents to create a navbar, and the
"Tabbable Nav" section from here to add the tab functionality.
Here's a jsfiddle if you prefer that, but also, here it is pasted here:
<head>
<meta charset="utf-8">
<title>Course Manager</title>
<link rel="stylesheet"
href="http://netdna.bootstrapcdn.com/bootswatch/2.3.2/cerulean/bootstrap.min.css"/>
</head>
<body>
<div class="container">
<div class="navbar">
<div class="navbar-inner">
<a class="brand" href="#">Training Courses</a>
<ul class="nav nav-tabs">
<li><a href="#courses" data-toggle="tab">Manage Courses</a></li>
<li><a href="#tools" data-toggle="tab">Manage Tools</a></li>
</ul>
</div>
</div>
<div class="tab-content">
<div class="tab-pane fade" id="courses">
<p>Courses</p>
</div>
<div class="tab-pane fade" id="tools">
<p>Tools</p>
</div>
</div>
</div>
<script
src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script
src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
</body>
No comments:
Post a Comment