1jQuery( function ( $ ) 2{ 3 var $body = $( 'body' ); 4 5 // Tabs 6 $( '.fitsc-tabs' ).each( function () 7 { 8 var $this = $( this ), 9 $ul = $this.children( 'ul' ), 10 $lis = $ul.children(), 11 $content = $this.children( 'div' ), 12 $divs = $content.children(); 13 14 $lis.filter( ':first' ).addClass( 'fitsc-active' ); 15 $divs.filter( ':first' ).addClass( 'fitsc-active' ); 16 17 $ul.on( 'click', 'li', function () 18 { 19 $lis.removeClass( 'fitsc-active' ); 20 $( this ).addClass( 'fitsc-active' ); 21 22 $divs.removeClass( 'fitsc-active' ) 23 .filter( ':eq(' + $lis.index( this ) + ')' ).addClass( 'fitsc-active' ); 24 25 return false; 26 } ); 27 28 // Tabs vertical 29 if ( ( $this ).hasClass( 'fitsc-vertical' ) ) 30 { 31 $content.css( 'marginLeft', $ul.width() ); 32 } 33 } ); 34 35 // Accordions 36 $body.on( 'click', '.fitsc-accordion .fitsc-title', function () 37 { 38 var $this = $( this ), 39 $parent = $this.parent(), 40 $pane = $this.siblings(), 41 $others = $parent.siblings(); 42 43 if ( $parent.hasClass( 'fitsc-active' ) ) 44 { 45 $pane.slideUp(); 46 $parent.removeClass( 'fitsc-active' ); 47 } 48 else 49 { 50 $others.removeClass( 'fitsc-active' ).find( '.fitsc-content' ).slideUp(); 51 $parent.addClass( 'fitsc-active' ); 52 $pane.slideDown(); 53 } 54 } ); 55 56 // Toggles 57 $body.on( 'click', '.fitsc-toggle .fitsc-title', function () 58 { 59 var $this = $( this ), 60 $parent = $this.parent(), 61 $pane = $this.siblings(); 62 63 if ( $parent.hasClass( 'fitsc-active' ) ) 64 { 65 $pane.slideUp(); 66 $parent.removeClass( 'fitsc-active' ); 67 } 68 else 69 { 70 $parent.addClass( 'fitsc-active' ); 71 $pane.slideDown(); 72 } 73 } ); 74 75 // Progress bars 76 $( '.fitsc-percent' ).each( function () 77 { 78 var $this = $( this ), 79 percentage = $this.data( 'percentage' ); 80 81 $this.css( 'width', '0' ); 82 $this.animate( { 83 width: percentage + '%' 84 }, 3000 ); 85 } ); 86 87 // Box close 88 $body.on( 'click', '.fitsc-box .fitsc-close', function () 89 { 90 $( this ).parent().slideUp( 500 ); 91 } ); 92} );
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.