Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
  <head>
    <script src="http://code.jquery.com/jquery.min.js"></script>
    <link href="http://getbootstrap.com/dist/css/bootstrap.css" rel="stylesheet" type="text/css" />
    <script src="http://getbootstrap.com/dist/js/bootstrap.js"></script>
    <script src="http://cdn.jquerytools.org/1.2.6/jquery.tools.min.js" type="text/javascript"></script>
    <meta charset=utf-8 />
    <title>JS Bin</title>
  </head>
  <body>
    <!-- tabs link -->
    <ul class="nav nav-tabs" id="rowTab">
      <li class="active"><a href="#personal-info" data-toggle="tab">Personal Information</a></li>
      <li><a href="#Employment-info" data-toggle="tab">Employment Information</a></li>
      <li><a href="#career-path" data-toggle="tab">Career Path</a></li>
      <li><a href="#warnings" data-toggle="tab">Warning</a></li>
    </ul>
    <!-- end: tabs link -->
    
    <div class="tab-content">
      <div class="tab-pane active" id="personal-info">
        tab1 data here...
      </div>
      
      <div class="tab-pane" id="Employment-info">
        tab2 data here...
      </div>
      
      <div class="tab-pane" id="career-path">
        tab3 data here...
      </div>
      
      <div class="tab-pane" id="warnings">
        tab4 data here...
      </div>
    </div>
  </body>
</html>
 
function getCookie(c_name) {
  var i, x, y, ARRcookies = document.cookie.split(";");
  for (i = 0; i < ARRcookies.length; i++) {
    x = ARRcookies[i].substr(0, ARRcookies[i].indexOf("="));
    y = ARRcookies[i].substr(ARRcookies[i].indexOf("=") + 1);
    x = x.replace(/^\s+|\s+$/g, "");
    if (x == c_name) {
      return unescape(y);
    }
  }
}
function setCookie(c_name, value, exdays) {
  console.log(c_name+"-->"+value);
  var exdate = new Date();
  exdate.setDate(exdate.getDate() + exdays);
  var c_value = escape(value) + ((exdays === null) ? "" : "; expires=" + exdate.toUTCString());
  document.cookie = c_name + "=" + c_value;
}
$("ul").click(function(){
  $("ul.nav-tabs").tabs("div.tab-content > div");
   var api = $("ul.nav-tabs").data("tabs");
   api.onClick(function(e, index) {
          setCookie("selectedtab", index + 1, 365);
   });     
   var selectedTab = getCookie("selectedtab");
   if (selectedTab != "undefined") {
    api.click( parseInt(selectedTab) ); 
   }
});
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers