No Data Available

0

1 ? (end / 1000).toFixed(decimalPoint) : parseInt((end / 1000).toString()); myCounter[counterId] = { id: counterId, ele: element, start: parseFloat(element.getAttribute('data-start')), end: end, steps: steps === 0 ? 1 : steps, points: decimalPoint, isDecimal: decimal.length > 1, separator: '', prefix: '', postfix: '', speed: parseInt(element.getAttribute('data-speed')), decimal: end.toString().split('.'), count: 0 } counterInit[counterId] = false; myCounterInterval[counterId] = 0; if (isInViewport(myCounter['2aec167'].ele) && ('2aec167' in counterInit) && counterInit['2aec167'] === false) { counterInit['2aec167'] = true; myCounterInterval['2aec167'] = setInterval(function () { myCounter['2aec167'].count++; updateCounter(myCounter['2aec167'].ele, myCounter['2aec167'], '2aec167'); }, parseInt(5000 / (myCounter['2aec167'].speed > 0 ? myCounter['2aec167'].speed : 1))); } document.addEventListener('scroll', function () { if (isInViewport(myCounter['2aec167'].ele) && ('2aec167' in counterInit) && counterInit['2aec167'] === false) { counterInit['2aec167'] = true; myCounterInterval['2aec167'] = setInterval(function () { myCounter['2aec167'].count++; updateCounter(myCounter['2aec167'].ele, myCounter['2aec167'], '2aec167'); }, parseInt(5000 / (myCounter['2aec167'].speed > 0 ? myCounter['2aec167'].speed : 1))); } }); } function numberWithCommas(x, separator) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, separator); } function updateCounter(ele, options, id) { if (ele == null) { clearInterval(myCounterInterval[counterId]); } let start = options.start + ((options.steps * options.count) + (Math.random() * (options.steps / 1.9))); let val = options.isDecimal ? parseFloat(start).toFixed(options.points) : parseInt(start); if (start >= options.end) { val = options.end; ele.textContent = (options.prefix !== '' ? options.prefix : '') + numberWithCommas(val, options.separator) + (options.postfix !== '' ? options.postfix : ''); clearInterval(myCounterInterval); } ele.textContent = (options.prefix !== '' ? options.prefix : '') + numberWithCommas(val, options.separator) + (options.postfix !== '' ? options.postfix : ''); }