1console.log('Expo js'); 2 3$(function () { 4 fireOnInView('h2.section-title', null, '-in-view'); 5 fireOnInView('.home__one-day-circles > div', function (c) { 6 //console.log(c); 7 var take = 300; 8 $(c).find('h3').each(function (i, t) { 9 window.setTimeout(function () { 10 console.log(t); 11 var val = parseInt($(t).data('val')); 12 var start = performance.now(); 13 function updateMe(now) { 14 var part = (now - start) / take; 15 if (part >= 1) { 16 $(t).text(val); 17 } else { 18 $(t).text(Math.ceil(val * part)); 19 requestAnimationFrame(updateMe); 20 } 21 } 22 requestAnimationFrame(updateMe); 23 }, i * take); 24 }); 25 }); 26}); 27 28function fireOnInView(selector, cb, cls) { 29 var targets = document.querySelectorAll(selector); 30 if (typeof (IntersectionObserver) === "function") { 31 var options = { 32 rootMargin: '0px', 33 threshold: 1.0 34 }; 35 var callback = function (entries, observer) { 36 entries.forEach(entry => { 37 //console.log(entry.isIntersecting, entry); 38 39 if (entry.intersectionRatio === 1) { 40 if (cls) $(entry.target).addClass(cls); 41 if (cb) cb(entry.target); 42 43 observer.unobserve(entry.target); 44 } 45 }); 46 }; 47 48 var observer = new IntersectionObserver(callback, options); 49 targets.forEach(function (t) { observer.observe(t); }); 50 } else { 51 if (cls) $(targets).addClass(cls); 52 if (cb) cb(targets); 53 } 54} 55 56 57window.addEventListener("load", function () { 58 $(document.documentElement).addClass("-loaded"); 59});
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.