1(function($){ 2 3 $(function(){ 4 if(typeof scrollBackToTop.autoFontSize !== 'undefined' && scrollBackToTop.autoFontSize){ 5 $('.scroll-back-to-top-wrapper').textfill({ maxFontPixels: 36 }); 6 } 7 8 $('.scroll-back-to-top-wrapper').on('click', function(){ 9 if(typeof scrollBackToTop.scrollDuration !== 'undefined'){ 10 scrollToElement("body", scrollBackToTop.scrollDuration, 0); 11 } 12 }); 13 14 $(document).on( 'scroll', function(){ 15 16 if ($(window).scrollTop() > 100) { 17 $('.scroll-back-to-top-wrapper').addClass('show'); 18 } else { 19 $('.scroll-back-to-top-wrapper').removeClass('show'); 20 } 21 }); 22 23 if(typeof scrollBackToTop.visibilityDuration !== 'undefined' && scrollBackToTop.visibilityDuration){ 24 $(window).on('scroll', function() { 25 clearTimeout($.data(this, 'sbttScrollTimer')); 26 $.data(this, 'sbttScrollTimer', setTimeout(function() { 27 $('.scroll-back-to-top-wrapper').removeClass('show'); 28 }, scrollBackToTop.visibilityDuration)); 29 }); 30 } 31 }); 32 33 function scrollToElement(selector, time, verticalOffset) { 34 35 time = typeof(time) != 'undefined' ? time : 1000; 36 verticalOffset = typeof(verticalOffset) != 'undefined' ? verticalOffset : 0; 37 element = $(selector); 38 offset = element.offset(); 39 offsetTop = offset.top + verticalOffset; 40 $('html, body').animate({scrollTop: offsetTop}, parseInt(time), 'linear'); 41 } 42 43 function isFullyVisible(el) { 44 45 if ( ! el.length ) { 46 return false; 47 } 48 49 if ( el instanceof jQuery ) { 50 el = el[0]; 51 } 52 53 var top = el.offsetTop; 54 var left = el.offsetLeft; 55 var width = el.offsetWidth; 56 var height = el.offsetHeight; 57 58 while(el.offsetParent) { 59 el = el.offsetParent; 60 top += el.offsetTop; 61 left += el.offsetLeft; 62 } 63 64 return ( 65 top >= window.pageYOffset && 66 left >= window.pageXOffset && 67 (top + height) <= (window.pageYOffset + window.innerHeight) && 68 (left + width) <= (window.pageXOffset + window.innerWidth) 69 ); 70 } 71 72 function isPartiallyVisible(el) { 73 74 if ( ! el.length ) { 75 return false; 76 } 77 78 if ( el instanceof jQuery ) { 79 el = el[0]; 80 } 81 82 var top = el.offsetTop; 83 var left = el.offsetLeft; 84 var width = el.offsetWidth; 85 var height = el.offsetHeight; 86 87 while(el.offsetParent) { 88 el = el.offsetParent; 89 top += el.offsetTop; 90 left += el.offsetLeft; 91 } 92 93 return ( 94 top < (window.pageYOffset + window.innerHeight) && 95 left < (window.pageXOffset + window.innerWidth) && 96 (top + height) > window.pageYOffset && 97 (left + width) > window.pageXOffset 98 ); 99 } 100})(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.