View Full Version : Lightbox and Accordion Content script conflict

05-18-2012, 06:51 PM
1) Script Title:
Accordion Content script (v2.0)
Lightbox image viewer 2.03a

2) Script URL (on DD):
3) Describe problem:
i've implemented "Accordion Content script" wirh jquery 1.6.1
and then implemented "Lightbox image viewer 2.03a"
both work OK when i remove the other scripts.
As i try to implement them together, the accordion stop responding, i.e. the expand/collapse of the sections does not work.

when i load the page, in google Chrome. i get in the developer tools the following errors:
Uncaught RangeError: Invalid array length prototype.js:464
Object.extend.shift prototype.js:464
f.extend.dequeue jquery.min.js:16
f.extend.speed.d.complete jquery.min.js:18
f.fx.step jquery.min.js:18
h jquery.min.js:18
f.fx.custom jquery.min.js:18
f.fx.show jquery.min.js:18
f.fn.extend.animate jquery.min.js:18
f.extend.dequeue jquery.min.js:16
f.fn.extend.queue jquery.min.js:16
e.extend.each jquery.min.js:16
e.fn.e.each jquery.min.js:16
f.fn.extend.queue jquery.min.js:16
f.fn.extend.animate jquery.min.js:18
f.each.f.fn.(anonymous function) jquery.min.js:18
ddaccordion.expandit ddaccordion.js:103
(anonymous function) ddaccordion.js:209
e.extend.each jquery.min.js:16
e.fn.e.each jquery.min.js:16
(anonymous function) ddaccordion.js:194
f.extend._Deferred.e.resolveWith jquery.min.js:16
e.extend.ready jquery.min.js:16
c.addEventListener.z jquery.min.js:16

Pls advs how to solve this problem ...
Best regards,

05-19-2012, 03:16 AM
The two scripts, though they can be made to work together are basically incompatible. Get rid of Lightbox. Use Slimbox2 instead. See:


for important details.

05-19-2012, 09:53 AM
Problem SOLVED !!!!

Updating prototype to version 1.7.0 from google's CDN.

This solved the conflict between jquery and prototype

05-19-2012, 04:00 PM
Yes, that will work as long as jQuery is in noConflict mode.

But now you have two script libraries on the page, both of which have about the same capabilities. If you use Slimbox2, you only need one script library on the page - jQuery. Of the two, jQuery is the more robust and it requires far less code to do what Prototype does. So your page(s) will load faster. Also, Slimbox2 has advantages over Lightbox 2.03a.

But, as I said, the two (Lightbox 2.03a and Accordion) can be made to work together.