1jQuery( function( $ ) { 2 3 "use strict"; 4 5 /* ------------------------------------------------------------------------ */ 6 /* Accordion */ 7 /* ------------------------------------------------------------------------ */ 8 9 jQuery('.accordion').each(function(){ 10 var acc = jQuery(this).attr("rel") * 2; 11 jQuery(this).find('.accordion-inner:nth-child(' + acc + ')').show(); 12 jQuery(this).find('.accordion-inner:nth-child(' + acc + ')').prev().addClass("active"); 13 }); 14 15 jQuery('.accordion .accordion-title').click(function() { 16 if(jQuery(this).next().is(':hidden')) { 17 jQuery(this).parent().find('.accordion-title').removeClass('active').next().slideUp(200); 18 jQuery(this).toggleClass('active').next().slideDown(200); 19 } 20 return false; 21 }); 22 23 /* ------------------------------------------------------------------------ */ 24 /* Toggle */ 25 /* ------------------------------------------------------------------------ */ 26 27 if( jQuery(".toggle .toggle-title").hasClass('active') ){ 28 jQuery(".toggle .toggle-title.active").closest('.toggle').find('.toggle-inner').show(); 29 } 30 31 jQuery(".toggle .toggle-title").click(function(){ 32 if( jQuery(this).hasClass('active') ){ 33 jQuery(this).removeClass("active").closest('.toggle').find('.toggle-inner').slideUp(200); 34 } 35 else{ 36 jQuery(this).addClass("active").closest('.toggle').find('.toggle-inner').slideDown(200); 37 } 38 }); 39 40 /* ------------------------------------------------------------------------ */ 41 /* Tabs */ 42 /* ------------------------------------------------------------------------ */ 43 jQuery( '.tabs' ).not( '.tabs-init' ).each( function() { 44 45 var $this = jQuery( this ); 46 47 $this.addClass( '.tabs-init' ); 48 49 $this 50 .find( 'div' ) 51 .hide() 52 .end() 53 .find( 'div:first' ) 54 .show() 55 .end() 56 .find( 'ul li:first' ) 57 .addClass('active'); 58 59 $this 60 .find( 'ul li a' ) 61 .click( function(){ 62 63 var $_this = jQuery( this ); 64 65 $this.find( 'ul li' ).removeClass('active'); 66 67 $_this.parent().addClass('active'); 68 69 var currentTab = $_this.attr('href'); 70 71 $this.find( 'div' ).hide(); 72 73 jQuery( currentTab ).show(); 74 75 return false; 76 77 }); 78 79 80 }); 81 82});
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.