1(function( $ ) { 2 3 $( document ).ready( function() { 4 5 // Make sure JS is enabled. 6 $( 'body' ).addClass( 'js' ); 7 8 // Run 0.25 seconds after document ready for any instances viewable on load. 9 setTimeout( function() { 10 animateObject(); 11 }, 250 ); 12 13 }); 14 15 $( window ).scroll( function() { 16 17 // Run on scroll. 18 animateObject(); 19 20 }); 21 22 function animateObject() { 23 24 // Define your object via class. 25 var object = $( '.fadeup-effect' ); 26 27 // Loop through each object in the array. 28 $.each( object, function() { 29 30 var windowHeight = $( window ).height(), 31 offset = $( this ).offset().top, 32 top = offset - $( document ).scrollTop(), 33 percent = Math.floor( top / windowHeight * 100 ); 34 35 if ( percent < 80 ) { 36 $( this ).addClass( 'fadeInUp' ); 37 } 38 39 }); 40 41 } 42 43})( 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.