Import legacy nurinda.co.id website
This commit is contained in:
1 parent
3f59bb9038
commit
6e21646ac4
13389 files changed
+3246690
No files matched your search
@@ -0,0 +1,29 @@
|
||||
// Tabs
|
||||
|
||||
( function( $ ) {
|
||||
$( document ).ready( function() {
|
||||
var titleWrap = '.wp-block-themepunchblocks-tpc-tabs-tab-title-wrap';
|
||||
var contentWrap = '.wp-block-themepunchblocks-tpc-tabs-tab-content-wrap';
|
||||
$( document )
|
||||
.on( 'click', '.wp-block-themepunchblocks-tpc-tabs-tab-title-wrap', function() {
|
||||
var parent = $(this)
|
||||
.closest('.wp-block-themepunchblocks-tpc-tabs');
|
||||
var contentWrapEl = parent
|
||||
.find('.wp-block-themepunchblocks-tpc-tabs-tab-content-wrap');
|
||||
var activeStyle = parent
|
||||
.find('.wp-block-themepunchblocks-tpc-tabs-tab-title-wrap.active')
|
||||
.attr('style');
|
||||
var defaultStyle = parent
|
||||
.find('.wp-block-themepunchblocks-tpc-tabs-tab-title-wrap:not(.active)')
|
||||
.attr('style');
|
||||
|
||||
$(this).siblings(titleWrap).removeClass('active').attr('style', defaultStyle);
|
||||
$(this).addClass('active').attr('style', activeStyle);
|
||||
|
||||
contentWrapEl.removeClass('active').addClass('tpc-hide');
|
||||
parent.find(contentWrap +':nth-of-type(' + ($(this).index() + 1) + ')')
|
||||
.addClass('active')
|
||||
.removeClass('tpc-hide');
|
||||
} );
|
||||
} );
|
||||
}( jQuery ) );
|
||||
Reference in new issue
Block a user