function clickHandler()

in src/assets/js/tabs.js [11:32]


  function clickHandler(e) {
    // console.log('>> click event for tab:', $(this));
    e.preventDefault();
    $(this).tab('show');

    var id = getTabIdFromQuery($(this).attr('href'));

    // Persist to local storage so we can pre-select around the site
    if (storageName && window.localStorage) {
      // console.log('>> setting localStorage', storageName, id);
      window.localStorage.setItem(storageName, id);
    }

    var l = location, query = '?tab=' + id;
    if (id && l.search != query) {
      var url = l.protocol + '//' + l.host + l.pathname + query + l.hash;
      // console.log('>> history.replaceState of', url);
      history.replaceState(undefined, undefined, url);
    } else {
      // console.log('>> location.search is already "', query, '"');
    }
  }