我最近继承了一个以各种方式拙劣的网站。我更像是一个php家伙,最初js工作得很好。我没有更改JavaScript或任何包含文件,但做了一些内容编辑后,我从萤火虫中收到错误。Jquery +原型冲突
a.dispatchEvent is not a function
emptyFunction()protot...ects.js (line 2)
emptyFunction()protot...ects.js (line 2)
fireContentLoadedEvent()protot...ects.js (line 2)
[Break on this error] var Prototype={Version:'1.6.0.2',Brows...pe,Enumerable);Element.addMethods();
protot...ects.js (line 2)
this.m_eTarget.setStyle is not a function
[Break on this error] this.m_eTarget.setStyle({ position: 'relative', overflow:'hidden'});
protot...ects.js (line 43)
uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE)" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: js/prototype_effects.js :: anonymous :: line 2" data: no]
周围的Googling我发现几个职位,有时的jQuery +原型不玩好,重新安排脚本能解决这个问题,不过是,我没有碰这些部分我不知道,我甚至需要开始调试。之前的开发人员合并了一个加载原型的head.inc文件,scriptaculous,然后许多页面都在一个子模板中,加载了jquery,用于像lightbox这样的函数。
该网站被临时安置在http://dawn.mikeyhill.com
任何帮助表示赞赏。