Spunky Posted March 29, 2015 Share Posted March 29, 2015 Is there somewhere that I am missing that shows how to make a functional tablist in Bootstrap on w3schools.com? For example, I found: http://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_ref_comp_nav-tabs&stacked=h But nothing anywhere about how to make this functional. I am having a rough time finding working code elsewhere. I have found a couple of things that work in their examples, but when I apply it to mine, it doesn't work. http://www.tutorialscollection.com/bootstrap-tabs-how-to-use-bootstrap-tab-plugin-with-examples/ http://jsfiddle.net/KyleMit/2VmmW/ Here is the code I have thus far: $(document).ready(function(){ $("#tabex a").click(function(e){ e.preventDefault(); $(this).tab('show'); });}); <ul class="nav nav-tabs" id="tabex" role="tablist"> <li class="active"><a href="#1st" role="tab" data-toggle="tab">1st</a></li> <li><a href="#2nd" role="tab" data-toggle="role">2nd</a></li></ul> <div class="tab-content"> <div class="tab-pane fade in active" id="pizza"> 1st content </div> <div class="tab-pane fade" id="pizzas"> 2nd content </div></div> Link to comment Share on other sites More sharing options...
dsonesuk Posted March 29, 2015 Share Posted March 29, 2015 It should work as a anchor bookmark would work, href="#pizza" of tab link, would target tab content container with id ref of id="pizza". Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now