jQuery & Prototype Conflict

Posted by DPereyra on Stack Overflow See other posts from Stack Overflow or by DPereyra
Published on 2008-09-25T17:05:45Z Indexed on 2010/03/29 6:03 UTC
Read the original article Hit count: 262

Hi,

I am using the jQuery AutoComplete plugin in an html page where I also have an accordion menu which uses prototype.

They both work perfectly separately but when I tried to implement both components in a single page I get an error that I have not been able to understand.

uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMViewCSS.getComputedStyle]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: file:///C:/Documents and Settings/Administrator/Desktop/website/js/jquery-1.2.6.pack.js :: anonymous :: line 11" data: no]

I found out the file conflicting with jQuery is 'effects.js' which is used by the accordion menu. I tried replacing this file with a newer version but newer seems to break the accordion behavior.

My guess is that the 'effects.js' file used in the accordion was modified to obtain the accordion demo output. I also tried using the overriding methods jQuery needs to avoid conflict with other libraries and that did not work.

I obtained the accordion demo from the following site: http://www.stickmanlabs.com/accordion/

And the jQuery AutoComplete can be obtained from: http://docs.jquery.com/Plugins/Autocomplete#Setup

Has any one else experienced this issue?

Thanks.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about prototype