jquery - How to load tabs in url using hash -
hi there fellow people of stackoverflow! have question how load tab called #a , 1 called #b using http://mydomaine.com/index.html#a or #b.
it's basic bootstrap code. don't know jquery need help.
<ul class="nav nav-tabs"> <li class="active"><a href="#a" data-toggle="tab">gutter</a></li> <li><a href="#b" data-toggle="tab">jenter</a></li> </ul>
you use when page loads:
$( document ).ready(function() { switch(window.location.hash) { case '#a': //do need if break; case '#b': //do need if b break; default: //default action } });
Comments
Post a Comment