IE9在IE7模式下,我收到以下错误.使用小计数脚本:
SCRIPT1028:预期的标识符,字符串或数字
码
$.fn.countTo.defaults = {
from: 0, // the number the element should start at
to: 100, // the number the element should end at
speed: 1000, // how long it should take to count between the target numbers
refreshInterval: 100, // how often the element should be updated
decimals: 2, // the number of decimal places to show
onUpdate: null, // callback method for every time the element is updated,
onComplete: null, // callback method for when the element finishes updating
};
Run Code Online (Sandbox Code Playgroud)
第185行是最后一个花括号和半冒号
我们需要这个工作,IE7但这个错误打破了脚本.
$.fn.countTo.defaults = {
from: 0, // the number the element should start at
to: 100, // the number the element should end at
speed: 1000, // how long it should take to count between the target numbers
refreshInterval: 100, // how often the element should be updated
decimals: 2, // the number of decimal places to show
onUpdate: null, // callback method for every time the element is updated,
onComplete: null // callback method for when the element finishes updating
};
Run Code Online (Sandbox Code Playgroud)
之后删除逗号 onComplete: null
| 归档时间: |
|
| 查看次数: |
202 次 |
| 最近记录: |