Make Twitter Bootstrap navbar work like tabs
Is there a way to make a navbar (which appears to be designed to link to other pages) behave like a set of nav tabs (which stay on the same page, hiding all but the desired section)?
Actually, my navbar works just as I want, but only if I don’t call $(“.nav-tabs”).button(), which I need for other things. Now none of the collapsing/uncollapsing happens.
Here’s the code (which is pretty boiler-plate):
I don’t see any obvious problem in wiring your nav links as tabs.
You just need to ommit tab classes not to override your navbar styles, and don’t forget the
data- attributes (if needed).
Everything should be working.
Edit : for posterity, you do need to include ONE of
bootstrap.js (or the minified version) and the associated css files too.
- Database Administration Tutorials
- Programming Tutorials & IT News
- Linux & DevOps World
- Ebook Reviews
- PES Matches, Skills & News