countUp.js 未加载
countUp.js doesnt load
我已经尝试设置 countUp.js 但它无法加载,我对 Javascript 或 Jquery 还是个新手所以也许我做错了什么?
<div id="count"></div>
// 脚本有问题吗?
var options = {
useEasing: true,
useGrouping: true,
separator: ',',
decimal: '.'
prefix: ''
suffix: ''
}
var test = new countUp("count", 1350, 10000, 0, 5000, options);
demo.start();
首先,您的对象的一些属性缺少尾随 ,
,因此您有语法错误。此外,您需要在 test
变量上调用 start()
,而不是 demo
。试试这个:
var options = {
useEasing: true,
useGrouping: true,
separator: ',',
decimal: '.',
prefix: '',
suffix: ''
}
var test = new countUp("count", 1350, 10000, 0, 5000, options);
test.start();
我已经尝试设置 countUp.js 但它无法加载,我对 Javascript 或 Jquery 还是个新手所以也许我做错了什么?
<div id="count"></div>
// 脚本有问题吗?
var options = {
useEasing: true,
useGrouping: true,
separator: ',',
decimal: '.'
prefix: ''
suffix: ''
}
var test = new countUp("count", 1350, 10000, 0, 5000, options);
demo.start();
首先,您的对象的一些属性缺少尾随 ,
,因此您有语法错误。此外,您需要在 test
变量上调用 start()
,而不是 demo
。试试这个:
var options = {
useEasing: true,
useGrouping: true,
separator: ',',
decimal: '.',
prefix: '',
suffix: ''
}
var test = new countUp("count", 1350, 10000, 0, 5000, options);
test.start();