Javascript jsgauge-setValue在Chrome中提供非法调用
我使用的首字母缩写为:Javascript jsgauge-setValue在Chrome中提供非法调用,javascript,jquery,Javascript,Jquery,我使用的首字母缩写为: $('#gauge').gauge('init'); 如果我试着打电话 $('#gauge').gauge('setValue', 50); 用铬我可以 未捕获类型错误:非法调用 但它可以在Firefox和IE9上运行。 你知道为什么吗?发现: 未捕获类型错误:非法调用 这发生在Google Chrome 12.0.742.100中,原因是jquery.qtip.js的第49行内容如下: if(console){ (console.warn || consol
$('#gauge').gauge('init');
如果我试着打电话
$('#gauge').gauge('setValue', 50);
用铬我可以
未捕获类型错误:非法调用
但它可以在Firefox和IE9上运行。你知道为什么吗?发现: 未捕获类型错误:非法调用 这发生在Google Chrome 12.0.742.100中,原因是jquery.qtip.js的第49行内容如下:
if(console){
(console.warn || console.log)(Array.prototype.slice.call(arguments));
}
将中间行改为console.warn(Array.prototype.slice.call(arguments))代码>按预期在chrome中工作
这对那个家伙起了作用,解决了我的问题
Patch gauge.js
line 350 & 356
- if (that.cancelRequestAnimFrame) {
+ if (that.cancelRequestAnimFrame && that.cancelRequestAnimFrame.arguments != null) {
那你为什么不接受你的答案而不是我的无论如何。