View Full Version : Javascript Conflict - Anyone?

08-07-2011, 12:47 PM

I'm creating a website and i've got coin-slider running on all my pages. I'm using three slides and it works fine on its own. However i'm having a gallery page and i'm using Lightbox2 and using this is causing a conflict with Coin-slider.

With the Lightbox scripts implemented Coin-slider displays the three images under one another (basically losing its interactivity).

Lightbox has three JS files and a CSS. (Lightbox.js, Sciptaculous.js & Prototype.js) I've been messing around and as soon as i leave out Prototype.js, Coin-slider starts working again, obviously Lightbox stops then though.

Does anyone have any idea how to fix this or what the conflict is?

btw i know next to nothing about coding, i know how to edit scripts to change certain things but thats about it.


08-07-2011, 03:05 PM
I'd try switching to SlimBox2 for the lightbox effect:


My thinking is that the Coin-Slider uses jQuery and so does SlimBox2. You should only need one external script tag for jQuery followed by the other required tags for each script.

There's a chance that the default slimbox init (AUTOLOAD CODE BLOCK) might not be adequate for your purposes. If so, I have one that should do the trick.

One nice thing with slimbox is that it uses the same link syntax as lightbox, so you don't have to change all of your lightbox links.

08-07-2011, 05:10 PM
Thanks, looks just like what i need.

I've just downloaded it and opened it up in Dreamweaver and the link file is there but theres no source file - instead by default its hyperlinked text.

I've copied and pasted this into slimbox, which is what i was using for lightbox2;

<a href="/images/box2.jpg" rel="lightbox[collection]"><img src="images/box2.jpg" alt="" width="100" height="110" border="0" class="border" /></a>

However will this once pasted into slimbox use slimbox's JS or will it continue to use Lightbox2 JS. Sorry if this doesn't make sense. My JS knowledge is limited.


08-07-2011, 10:35 PM
I have no idea what you're talking about. The thing to do is remove all the lightbox script tags and the lightbox style link tag from the page. Install slimbox as instructed on its home page.

If you are having trouble getting the slimbox archive, download it from this page:


Once you have it, unzip it and use the files found inside as instructed on the home page: