src/tabs.js
// and (optionally) deactivate others
and (optionally) deactivate others
and ( optionally ) deactivate others
activateTabToggle(hash, isSticky = false) {
    const $thisTab = $(hash);
    const $tabLinks = this.$tabToggles.filter(function() {
      return $(this).attr('href') === hash;
    });
    if (!isSticky) {
      if ($thisTab.is(':visible')) return;
      const tabsGroups = [];
      $tabLinks.each(function() {
        const thisTabGroup = $(this).data('tabs-group');
        if (tabsGroups.indexOf(thisTabGroup) === -1) {
          tabsGroups.push(thisTabGroup);
        }
      });
      const $tabsGroup = this.$tabToggles.filter(function() {
        return tabsGroups.indexOf($(this).data('tabs-group')) > -1;
      });
      for (let i = 0; i < $tabsGroup.length; i++) {
        this.options.toggleTab($tabsGroup[i], false);
      }
      for (let i = 0; i < $tabLinks.length; i++) {
        this.options.toggleTab($tabLinks[i], true);
      }
    } else {
      if ($thisTab.is(':visible')) {
        for (let i = 0; i < $tabLinks.length; i++) {
          this.options.toggleTab($tabLinks[i], false);
        }
      } else {
        for (let i = 0; i < $tabLinks.length; i++) {
          this.options.toggleTab($tabLinks[i], true);
        }
      }
    }
  }
activateTabToggle ( hash , isSticky = false ) { const $thisTab = $ ( hash ) ; const $tabLinks = this . $tabToggles . filter ( function ( ) { return $ ( this ) . attr ( 'href' ) === hash ; } ) ; if ( ! isSticky ) { if ( $thisTab . is ( ':visible' ) ) return ; const tabsGroups = [ ] ; $tabLinks . each ( function ( ) { const thisTabGroup = $ ( this ) . data ( 'tabs-group' ) ; if ( tabsGroups . indexOf ( thisTabGroup ) === - 1 ) { tabsGroups . push ( thisTabGroup ) ; } } ) ; const $tabsGroup = this . $tabToggles . filter ( function ( ) { return tabsGroups . indexOf ( $ ( this ) . data ( 'tabs-group' ) ) > - 1 ; } ) ; for ( let i = 0 ; i < $tabsGroup . length ; i ++ ) { this . options . toggleTab ( $tabsGroup [ i ] , false ) ; } for ( let i = 0 ; i < $tabLinks . length ; i ++ ) { this . options . toggleTab ( $tabLinks [ i ] , true ) ; } } else { if ( $thisTab . is ( ':visible' ) ) { for ( let i = 0 ; i < $tabLinks . length ; i ++ ) { this . options . toggleTab ( $tabLinks [ i ] , false ) ; } } else { for ( let i = 0 ; i < $tabLinks . length ; i ++ ) { this . options . toggleTab ( $tabLinks [ i ] , true ) ; } } } }
and (optionally) deactivate others
and ( optionally ) deactivate others
// Find tablinks that point to this hash // Tab stickyness not active, target all other tabs in group // Grab all the groups these links belong to // Filter all the tabs to only those belonging to these groups // Disable all the tab links // Enable just the tab links associated with this hash // Tabs are sticky, so we should only toggle items matching this hash // Enable just the tab links associated with this hash