Results 1 to 4 of 4

Thread: Javascript Conflict - Anyone?

  1. #1
    Join Date
    Aug 2011
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Javascript Conflict - Anyone?

    Hi,

    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.

    Thanks.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I'd try switching to SlimBox2 for the lightbox effect:

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

    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Aug 2011
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    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.

    Thanks

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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:

    http://code.google.com/p/slimbox/dow...imbox-2.04.zip

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

    http://www.digitalia.be/software/slimbox2#usage
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •