Make Twitter Bootstrap navbar work like tabs

后端 未结 1 1909
后悔当初
后悔当初 2021-01-03 23:33

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

相关标签:
1条回答
  • 2021-01-04 00:00

    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).

    Then you have to use the JavaScript activation as specified in the docs (or use the data-toggle="tab" attribute).

    Everything should be working.

    Edit : for posterity, you do need to include ONE of bootstrap-tab.js or bootstrap.js (or the minified version) and the associated css files too.

    0 讨论(0)
提交回复
热议问题