我尝试使用 countup.js - 我过去使用过几次,但现在它不再工作了。有人看到错误吗?
HTML:
<div id="counter">1000</div>
JS:
function countup() {
var options = {
useEasing: true,
useGrouping: true,
separator: '.',
decimal: ',',
suffix: 'People'
};
var demo = new CountUp('counter', 0, $("#counter").text(), 2, 4, options);
if (!demo.error) {
demo.start();
} else {
console.error(demo.error);
}
}
countup();
这是代码笔:https ://codepen.io/anon/pen/PrGvvK
相关分类