src/tabs.js
// Bind event handlers to the scope target.
Bind event handlers to the scope target.
Bind event handlers to the scope target .
_bindEvents() {
    this.$scope.on('click.bc-tabs', this.options.tabToggle, (event) => {
      event.preventDefault();
      const hash = $(event.target).attr('href');
      this.activateTab(hash);
      if (this.options.tabHistory) {
        history.pushState({}, hash, hash);
      } else {
        history.replaceState({}, hash, hash);
      }
    });
    $(window).on('hashchange.bc-tabs', () => {
      this.activateTab(window.location.hash);
    });
    $(window).on('resize.bc-tabs', debounce(() => {
      this._init(true);
    }, 300));
  }
_bindEvents ( ) { this . $scope . on ( 'click.bc-tabs' , this . options . tabToggle , ( event ) => { event . preventDefault ( ) ; const hash = $ ( event . target ) . attr ( 'href' ) ; this . activateTab ( hash ) ; if ( this . options . tabHistory ) { history . pushState ( { } , hash , hash ) ; } else { history . replaceState ( { } , hash , hash ) ; } } ) ; $ ( window ) . on ( 'hashchange.bc-tabs' , ( ) => { this . activateTab ( window . location . hash ) ; } ) ; $ ( window ) . on ( 'resize.bc-tabs' , debounce ( ( ) => { this . _init ( true ) ; } , 300 ) ) ; }
Bind event handlers to the scope target.
Bind event handlers to the scope target .