You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
557 B

( function ( $ ) {
'use strict';
function tabs() {
var $container = $( '.nav-tab-wrapper' ),
$tabs = $container.find( '.nav-tab' ),
$panes = $( '.gt-tab-pane' );
$container.on(
'click',
'.nav-tab',
function ( e ) {
e.preventDefault();
$tabs.removeClass( 'nav-tab-active' );
$( this ).addClass( 'nav-tab-active' );
$panes.removeClass( 'gt-is-active' );
$panes.filter( $( this ).attr( 'href' ) ).addClass( 'gt-is-active' );
}
);
}
// Auto activate tabs when DOM ready.
$( tabs );
} ( jQuery ) );