我最近繼承了一個以各種方式拙劣的網站。我更像是一個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
任何幫助表示讚賞。