1! function( $ ) { 2 "use strict"; 3 4 Codevz_Plus.counter = function() { 5 6 $( '.cz_counter' ).codevzPlus( 'counter', function( x, i ) { 7 8 var del = $( window ).width() <= 480 ? 0 : parseInt( x.data( 'delay' ) ) || 0, 9 eln = x.find( '.cz_counter_num' ), 10 org = eln.text(), 11 per = Math.ceil( org ).toLocaleString() == 'NaN' ? true : false, 12 lan = Codevz_Plus.language( org.replace( '%', '' ) ), 13 num = parseInt( Codevz_Plus.convertNumbers( org, false, lan ) ), 14 dur = parseInt( x.data( 'duration' ) ), 15 com = !x.data( 'disable-comma' ), 16 tls = com ? Math.ceil( num ).toLocaleString() : Math.ceil( num ); 17 18 // No counter. 19 if ( dur == 0 || x.hasClass( 'done' ) ) { 20 //if ( dur == 0 || x.hasClass( 'done' ) || $( window ).width() <= 768 ) { 21 22 eln.html( per ? Codevz_Plus.convertNumbers( tls, true, lan ) : tls ); 23 24 return; 25 26 } 27 28 // Set zero. 29 eln.html( per ? Codevz_Plus.convertNumbers( '0', true, lan ) : '0' ); 30 31 // On page scrolling 32 $( window ).on( 'scroll.counter', function() { 33 34 if ( Codevz_Plus.inview( x ) && ! x.hasClass( 'done' ) ) { 35 36 x.addClass( 'done' ).delay( del ).prop( 'Counter', 0 ).animate( 37 { 38 Counter: num 39 }, 40 { 41 duration: dur, 42 easing: 'swing', 43 step: function () { 44 num = com ? Math.ceil( this.Counter ).toLocaleString() : Math.ceil( this.Counter ); 45 eln.text( per ? Codevz_Plus.convertNumbers( num, true, lan ) : num ); 46 }, 47 complete: function() { 48 eln.text( per ? Codevz_Plus.convertNumbers( tls, true, lan ) : tls ); 49 } 50 } 51 ); 52 } 53 54 if ( ! $( '.cz_counter:not(.done)' ).length ) { 55 $( window ).off( 'scroll.counter' ); 56 } 57 58 }).trigger( 'scroll.counter' ); 59 60 }); 61 62 }; 63 64 Codevz_Plus.counter(); 65 66}( jQuery );
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.