active_tab.pug 291 B

12345678910
  1. script(type="text/javascript").
  2. if (window.location.hash) {
  3. setTimeout(function(){
  4. tabID = window.location.hash.replace(/#!?/, '')
  5. tab = document.getElementById(tabID)
  6. if (tab && typeof(tab) != 'undefined' && tab != null) {
  7. tab.setAttribute('active', true)
  8. }
  9. }, 500);
  10. }