1/* scroll animations plugin */ 2(function($) { 3 $.fn.animateIn = function(options) { 4 return this.each(function() { 5 var settings = $.extend( 6 { 7 //default settings 8 offset: 0, 9 modifier: '__in' 10 }, 11 options 12 ); 13 14 var item = $(this); 15 var itemOffsetTop = $(this).offset().top; 16 var triggerVal = itemOffsetTop + settings.offset; 17 18 function animateBlock(scrollTop) { 19 // if element is already in view or check if it comes into view 20 if ( 21 scrollTop + $(window).outerHeight() >= triggerVal || 22 $(window).outerHeight() >= triggerVal 23 ) { 24 item.addClass(settings.modifier); 25 } 26 } 27 28 $(window).on('scroll', { passive: true }, function() { 29 var scrollTop = $(window).scrollTop(); 30 animateBlock(scrollTop); 31 }); 32 $(window).trigger('scroll'); 33 }); 34 }; 35})(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.