src/tabs.js
// Default function to toggle some content on or off
Default function to toggle some content on or off
Default function to toggle some content on or off
_defaultToggleContent(element, active) {
    const $element = $(element);
    if (active) {
      if (this.previousStyle === 'slide') {
        $element.slideDown('fast', () => {
          this.options.afterChange($element);
        });
      } else {
        $element.show();
        this.options.afterChange($element);
      }
    } else {
      if (this.previousStyle === 'slide') {
        $element.slideUp('fast', () => {
          this.options.afterChange($element);
        });
      } else {
        $element.hide();
        this.options.afterChange($element);
      }
    }
  }
_defaultToggleContent ( element , active ) { const $element = $ ( element ) ; if ( active ) { if ( this . previousStyle === 'slide' ) { $element . slideDown ( 'fast' , ( ) => { this . options . afterChange ( $element ) ; } ) ; } else { $element . show ( ) ; this . options . afterChange ( $element ) ; } } else { if ( this . previousStyle === 'slide' ) { $element . slideUp ( 'fast' , ( ) => { this . options . afterChange ( $element ) ; } ) ; } else { $element . hide ( ) ; this . options . afterChange ( $element ) ; } } }
Default function to toggle some content on or off
Default function to toggle some content on or off
// Set the tab to active // show with a slidetoggle // Show simply via display // Set the tab to inactive // Remove via a slideToggle // Remove via a simple hide