Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/425.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript jsgauge-setValue在Chrome中提供非法调用_Javascript_Jquery - Fatal编程技术网

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) {

那你为什么不接受你的答案而不是我的无论如何。