PluginProbe
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services / 8.8.0
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services v8.8.0
8.8.0 8.7.9 8.7.8 8.7.7 8.7.6 8.7.5 8.7.4 8.7.3 8.7.2 8.7.1 8.7.0 8.6.9 8.6.8 8.6.7 8.6.6 8.6.5 8.6.4 8.6.2 8.6.1 8.6.0 8.5.9 8.5.8 8.5.7 8.5.6 8.5.5 All 536 releases
← All changes | js/cbpFWTabs.js +17 -10 8.6.8 → 8.8.0 View file →
@@ -1,4 +1,4 @@
1 1 /**
2 2 * cbpFWTabs.js v1.0.0
3 3 * http://www.codrops.com
4 4 *
@@ -54,18 +54,25 @@
54 54 } );
55 55 } );
56 56 };
57 57
58 - CBPFWTabs.prototype._show = function( idx ) {
59 - if( this.current >= 0 ) {
60 - this.tabs[ this.current ].className = this.items[ this.current ].className = '';
61 - }
62 - // change current
63 - this.current = idx != undefined ? idx : this.options.start >= 0 && this.options.start < this.items.length ? this.options.start : 0;
64 - this.tabs[ this.current ].className = 'tab-current';
65 - this.items[ this.current ].className = 'content-current';
66 - };
58 + CBPFWTabs.prototype._show = function( idx ) {
59 + if( this.current >= 0 ) {
60 + this.tabs[ this.current ].className = '';
61 + if( this.items[ this.current ] ) {
62 + this.items[ this.current ].className = '';
63 + }
64 + }
65 + // change current
66 + this.current = idx != undefined ? idx : this.options.start >= 0 && this.options.start < this.items.length ? this.options.start : 0;
67 + this.tabs[ this.current ].className = 'tab-current';
68 + var sectionSelector = this.tabs[ this.current ].getAttribute( 'data-section' );
69 + var section = sectionSelector ? this.el.querySelector( sectionSelector ) : this.items[ this.current ];
70 + if( section ) {
71 + section.className = 'content-current';
72 + }
73 + };
67 74
68 75 // add to global namespace
69 76 window.CBPFWTabs = CBPFWTabs;
70 77
71 -})( window );
78 +})( window );