openam / bootstrap-responsive-tabs

Bootstrap responsive tabs are tabs that switch to collapsible components (accordions) when resized.
openam.github.io/bootstrap-responsive-tabs
MIT License
132 stars 60 forks source link

To set the default tab from url ( url with #id of elemnt) #8

Closed UmerFarook closed 10 years ago

UmerFarook commented 10 years ago

To set the default tab from url ( url with #id of element) use this in you code

if (window.location.hash !== '') { var hasHash = window.location.hash; $('a[href="'+ hasHash +'"]').click(); }

openam commented 10 years ago

I've done similar things on php based projects. I'm not going to add this straight into this project because it may cause issues on single page Javascript apps.