Dav*_*and 15 jquery joomla undefined typeerror
这个问题只出现在joomla中 -
我试图在我的joomla网站上使用contentflow插件
这是插件网站 - http://www.jacksasylum.eu/ContentFlow/
这是我的网站 - http://2-dweb.com/RND/
你可以看到它不起作用 - 它只是永远停留在加载阶段
经过仔细检查,我可以看到此代码存在问题:
if (this.content.nodeName == "IMG") {
CFobj._imagesToLoad++;
var foobar = function () {
CFobj._imagesToLoad--;
this.image = this.content;
this.setImageFormat(this.image);
if ( CFobj.conf.reflectionHeight > 0) {
this.addReflection();
}
this.initClick();
CFobj._addItemCueProcess(true);
}.bind(this);
if (this.content.complete && this.content.width > 0)
window.setTimeout(foobar, 100);
else if (this.Browser.IE && !this.content.onload) {
var self = this;
var t = window.setInterval( function () {
if (self.content.complete && self.content.width > 0) {
window.clearInterval(t);
foobar();
}
}, 10);
}
else
this.content.onload = window.setTimeout(foobar, 100);
}
else {
this.initClick();
CFobj._addItemCueProcess(true);
}
};
Run Code Online (Sandbox Code Playgroud)
第一行 - 它表示"Uncaught TypeError:无法读取未定义的属性'nodeName'"
但这个东西适用于我的桌面html文件和插件网站上它自己!
为什么它不适用于我的joomla网站?它不是冲突的东西 - 我使用无冲突,我有其他jquery插件工作
更新:
rob w帮助我解决了这个错误:"将第一行更改为if(this.content && this.content.nodeName =="IMG"){.这解决了问题"
它确实如此,但现在又出现了另一个错误:
initClick: function () {
var cItem = this.clickItem;
this[this._activeElement].addEvent('click', cItem, false);
},
Run Code Online (Sandbox Code Playgroud)
错误 - 未捕获TypeError:无法调用未定义的方法'addEvent'
Tec*_*hie 17
由于错误解释"Uncaught TypeError:无法读取未定义的属性'nodeName'"当脚本尝试访问该元素时,该元素不可用.您可以通过两种方式解决此问题.
| 归档时间: |
|
| 查看次数: |
54624 次 |
| 最近记录: |