PDA

View Full Version : Resolved Conflict with Lightbox V2 and Glossy Accordion Menu



BorderTerroir
02-13-2015, 10:10 AM
Script: Lightbox image viewer 2.03a
http://www.dynamicdrive.com/dynamicindex4/lightbox2/index.htm

I have a conflict with Lightbox V2 and Glossy Accordion Menu.
http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu-glossy.htm

When I combine the two the accordion does not open.

I already have the script working with Lightbox V1 but when I use V2 and the associated js files the conflict occurs.
http://www.castlefordheritagetrust.org.uk/Activities.php

I have not published the changes so I cannot give you a live page to examine.

Please advise

John

ddadmin
02-13-2015, 07:10 PM
Hmm it could be due to a conflict between the Prototype library (used by Lightbox v2) and jQuery (used by Accordion Menu). Inside ddaccordion.js at the top, try adding the line in red to it:



jQuery.noConflict()

var ddaccordion={
ajaxloadingmsg: '<img src="loading2.gif" /><br />Loading Content...', //customize HTML to output while Ajax content is being fetched (if applicable)

BorderTerroir
02-13-2015, 11:27 PM
Many thanks, will try in the morning it's coming up to midnight here.

BorderTerroir
02-14-2015, 07:14 AM
Hmm it could be due to a conflict between the Prototype library (used by Lightbox v2) and jQuery (used by Accordion Menu). Inside ddaccordion.js at the top, try adding the line in red to it:



jQuery.noConflict()

var ddaccordion={
ajaxloadingmsg: '<img src="loading2.gif" /><br />Loading Content...', //customize HTML to output while Ajax content is being fetched (if applicable)

Sorry I've tried this with the ddaccordion file and the LightboxV2 files and it didn't work. :-(

John

ddadmin
02-17-2015, 10:00 PM
Ok tried a few other things to no avail. If you have time I'll try and come back to this.

jscheuer1
02-18-2015, 07:11 PM
I'd suggest updating to a more recent version of Lightbox (it now is jQuery based) or using one of the jQuery based Lightbox clones like Slimbox, or Fancybox (there are many to choose from).

Current Lightbox (jQuery based):

http://lokeshdhakar.com/projects/lightbox2/

Slimbox:

http://www.digitalia.be/software/slimbox2

For other jQuery based Lightbox clones Google 'jquery lightbox clones'.

See also my blog entry on working with Slimbox (written before Lightbox updated to jQuery based, but still applicable to usage of Slimbox):

http://www.dynamicdrive.com/forums/entry.php?247-Lightbox-Bad-SlimBox-Good

BorderTerroir
02-23-2015, 06:49 AM
Thanks for that I've updated to FancyBox and it works.

John