javascript - Twitter Bootstrap Tabs: Go to Specific Tab on Page Reload or Hyperlink -


i'm developing web page in i'm using twitter's bootstrap framework , bootstrap tabs js. works great except few minor issues, 1 of not know how go directly specific tab external link. example:

<a href="facility.php#home">home</a> <a href="facility.php#notes">notes</a> 

should go home tab , notes tab respectively when clicked on links external page

here solution problem, bit late perhaps. maybe others:

// javascript enable link tab var url = document.location.tostring(); if (url.match('#')) {     $('.nav-tabs a[href="#' + url.split('#')[1] + '"]').tab('show'); }   // change hash page-reload $('.nav-tabs a').on('shown.bs.tab', function (e) {     window.location.hash = e.target.hash; }) 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -