1/** 2 * Kopa Shortcode 3 * Author: Kopatheme 4 * Licensed under GNU General Public License v3 5 */ 6 7jQuery(document).ready(function() { 8 9 jQuery( '.tabs-1' ).each(function () { 10 var $this = jQuery(this), 11 firstTabContentID = $this.find('li a').first().attr('href'); 12 13 // add active class to first list item 14 $this.children('li').first().addClass('active'); 15 16 // hide all tabs 17 $this.find('li a').each(function () { 18 var tabContentID = jQuery(this).attr('href'); 19 jQuery(tabContentID).hide(); 20 }); 21 // show only first tab 22 jQuery(firstTabContentID).show(); 23 24 $this.children('li').on('click', function(e) { 25 e.preventDefault(); 26 var $this = jQuery(this), 27 $currentClickLink = $this.children('a'); 28 29 if ( $this.hasClass('active') ) { 30 return; 31 } else { 32 $this.addClass('active') 33 .siblings().removeClass('active'); 34 } 35 36 $this.siblings('li').find('a').each(function () { 37 var tabContentID = jQuery(this).attr('href'); 38 jQuery(tabContentID).hide(); 39 }); 40 41 jQuery( $currentClickLink.attr('href') ).fadeIn(); 42 43 }); 44 }); 45 46 jQuery( '.tabs-2' ).each(function () { 47 var $this = jQuery(this), 48 firstTabContentID = $this.find('li a').first().attr('href'); 49 50 // add active class to first list item 51 $this.children('li').first().addClass('active'); 52 53 // hide all tabs 54 $this.find('li a').each(function () { 55 var tabContentID = jQuery(this).attr('href'); 56 jQuery(tabContentID).hide(); 57 }); 58 // show only first tab 59 jQuery(firstTabContentID).show(); 60 61 $this.children('li').on('click', function(e) { 62 e.preventDefault(); 63 var $this = jQuery(this), 64 $currentClickLink = $this.children('a'); 65 66 if ( $this.hasClass('active') ) { 67 return; 68 } else { 69 $this.addClass('active') 70 .siblings().removeClass('active'); 71 } 72 73 $this.siblings('li').find('a').each(function () { 74 var tabContentID = jQuery(this).attr('href'); 75 jQuery(tabContentID).hide(); 76 }); 77 78 jQuery( $currentClickLink.attr('href') ).fadeIn(); 79 80 }); 81 }); 82 83 jQuery( '.tabs-3' ).each(function () { 84 var $this = jQuery(this), 85 firstTabContentID = $this.find('li a').first().attr('href'); 86 87 // add active class to first list item 88 $this.children('li').first().addClass('active'); 89 90 // hide all tabs 91 $this.find('li a').each(function () { 92 var tabContentID = jQuery(this).attr('href'); 93 jQuery(tabContentID).hide(); 94 }); 95 // show only first tab 96 jQuery(firstTabContentID).show(); 97 98 $this.children('li').on('click', function(e) { 99 e.preventDefault(); 100 var $this = jQuery(this), 101 $currentClickLink = $this.children('a'); 102 103 if ( $this.hasClass('active') ) { 104 return; 105 } else { 106 $this.addClass('active') 107 .siblings().removeClass('active'); 108 } 109 110 $this.siblings('li').find('a').each(function () { 111 var tabContentID = jQuery(this).attr('href'); 112 jQuery(tabContentID).hide(); 113 }); 114 115 jQuery( $currentClickLink.attr('href') ).fadeIn(); 116 117 }); 118 }); 119 120});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.