1(function($) { 2 'use strict'; 3 $.fn.sqrPopuptext = function() { 4 $(this).each(function() { 5 var fadeIn = true, 6 stage = $(this), 7 items = stage.children('div'); 8 9 function handleScroll() { 10 var containerTop = stage.offset().top, 11 containerHeight = stage.height(), 12 windowheight = $(window).height(), 13 scrolltop = $(window).scrollTop(); 14 15 if (fadeIn) { 16 if (containerTop + containerHeight / 3 < scrolltop + windowheight) { 17 fadeIn = false; 18 19 items.each(function() { 20 var item = $(this); 21 var delay = parseInt(item.attr('data-delay'), 10); 22 window.setTimeout(function() { 23 item.removeClass('sqrpopuptextfade sqrpopuptextleft sqrpopuptextright sqrpopuptexttop sqrpopuptextbottom sqrpopuptextzoom'); 24 }, delay); 25 }); 26 } 27 } 28 } 29 30 $(window).on('scroll', handleScroll); 31 $(window).on('load', handleScroll); 32 33 }); 34 }; 35})(jQuery); 36 37$(document).ready(function() { 38 $('.sqrpopuptext').sqrPopuptext(); 39});
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.