1! function (t) { 2 "use strict"; 3 t.fn.countUp = function (e) { 4 var a = t.extend({ 5 time: 2e3, 6 delay: 10 7 }, e); 8 return this.each(function () { 9 var e = t(this), 10 n = a, 11 u = function () { 12 e.data("counterupTo") || e.data("counterupTo", e.text()); 13 var t = parseInt(e.data("counter-time")) > 0 ? parseInt(e.data("counter-time")) : n.time, 14 a = parseInt(e.data("counter-delay")) > 0 ? parseInt(e.data("counter-delay")) : n.delay, 15 u = t / a, 16 r = e.data("counterupTo"), 17 o = [r], 18 c = /[0-9]+,[0-9]+/.test(r); 19 r = r.replace(/,/g, ""); 20 for (var d = (/^[0-9]+$/.test(r), /^[0-9]+\.[0-9]+$/.test(r)), s = d ? (r.split(".")[1] || []).length : 0, i = u; i >= 1; i--) { 21 var p = parseInt(Math.round(r / u * i)); 22 if (d && (p = parseFloat(r / u * i).toFixed(s)), c) 23 for (; 24 /(\d+)(\d{3})/.test(p.toString());) p = p.toString().replace(/(\d+)(\d{3})/, "$1,$2"); 25 o.unshift(p) 26 } 27 e.data("counterup-nums", o), e.text("0"); 28 var f = function () { 29 if (e.data('counterup-nums')) { //å 个è¿ä¸ªå¤æ ä¿®å¤ cannot read property 'shift' of null bug 30 e.text(e.data("counterup-nums").shift()); 31 e.data("counterup-nums").length ? setTimeout(e.data("counterup-func"), a) : (delete e.data("counterup-nums"), e.data("counterup-nums", null), e.data("counterup-func", null)) 32 } 33 // ä¸é¢æºä»£ç 34 // e.text(e.data("counterup-nums").shift()), e.data("counterup-nums").length ? setTimeout(e.data("counterup-func"), a) : (delete e.data("counterup-nums"), e.data("counterup-nums", null), e.data("counterup-func", null)) 35 }; 36 e.data("counterup-func", f), setTimeout(e.data("counterup-func"), a); 37 }; 38 39 // æºç è°ç¨waypointæ 线次æ§è¡æ°åå¨ç» 40 // e.waypoint(u, { 41 // offset: "100%", 42 // triggerOnce: !0 43 // }); 44 45 // ä¿®æ¹ åªæ§è¡ä¸æ¬¡æ°åå¨ç» 46 var scrollBool = true; 47 $(window).on('scroll', function () { 48 if ($(window).height() + $(document).scrollTop() >= e.offset().top && scrollBool) { 49 // console.log("first come!"); 50 scrollBool = false; 51 u(); // æå¨è°ç¨1次æ°åå¨ç»è®¡æ°å½æ° 52 } 53 }).trigger("scroll"); 54 55 56 }) 57 } 58}(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.