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

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -