?AlkantarClanX12
| Current Path : /home/rankinh/villavanille/wp-content/plugins/drew-core/inc/shortcodes/tabs/assets/js/parts/ |
| Current File : /home/rankinh/villavanille/wp-content/plugins/drew-core/inc/shortcodes/tabs/assets/js/parts/tabs.js |
(function ( $ ) {
'use strict';
qodefCore.shortcodes.drew_core_tabs = {};
$( document ).ready(
function () {
qodefTabs.init();
}
);
var qodefTabs = {
init: function () {
this.holder = $( '.qodef-tabs' );
if ( this.holder.length ) {
this.holder.each(
function () {
qodefTabs.initItem( $( this ) );
}
);
}
},
initItem: function ( $currentItem ) {
$currentItem.children( '.qodef-tabs-content' ).each(
function ( index ) {
index = index + 1;
var $that = $( this ),
link = $that.attr( 'id' ),
$navItem = $that.parent().find( '.qodef-tabs-navigation li:nth-child(' + index + ') a' ),
navLink = $navItem.attr( 'href' );
link = '#' + link;
if ( link.indexOf( navLink ) > -1 ) {
$navItem.attr(
'href',
link
);
}
}
);
$currentItem.addClass( 'qodef--init' ).tabs();
}
};
qodefCore.shortcodes.drew_core_tabs.qodefTabs = qodefTabs;
})( jQuery );