Results 1 to 5 of 5

Thread: Probable conflict between Lightbox 2.03a and Bullet List Accordion Menu

  1. #1
    Join Date
    Oct 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Probable conflict between Lightbox 2.03a and Bullet List Accordion Menu

    1) Script Title:
    Lightbox 2.03a and Bullet List Accordion Menu

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...box2/index.htm
    http://www.dynamicdrive.com/dynamici...enu-bullet.htm

    3) Describe problem:
    First off, let me say that I'm aware that this type of problem is not typically addressed in the forums. However, I'm hoping someone might be willing to help as was the case in a similar thread: http://www.dynamicdrive.com/forums/s...ad.php?t=37797

    Simply put, I am trying to use the Lightbox effect on images revealed by the accordion menu.

    Here is the page where I'm attempting to do this: http://creativemerc.com/testing/dvdandrea/index.html

    When the visitor clicks on the "Prints" image, for instance, it should open to reveal a number of thumbnails that can be clicked to view their enlargements via Lightbox.

    I'm fairly certain that it is a conflict between Lightbox and the accordion menu because each of the elements works when the other is removed.

    I'm hoping that a fix similar to the one detailed on http://www.dynamicdrive.com/forums/s...ad.php?t=37797 will be possible. I even went so far as to make the adjustments to the javascript files described on that thread but had no luck.

    I appreciate any information that you could provide.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,000
    Thanks
    44
    Thanked 3,198 Times in 3,160 Posts
    Blog Entries
    12

    Default

    First of all, Accordion Menu uses the jQuery javascript library, while Lightbox 2.03a (including all other versions of Lightbox, though not all lightbox 'clones'/imitators) use the prototype.js library and supplements to it. These two libraries both make use of $ for many global functions, but they differ in how they do that, so conflicts are inevitable.

    There are many ways to set jQuery to a no conflict mode though. So do that. Here's one fairly simple method:

    Quote Originally Posted by ddadmin
    (W)hat you can do is . . . inside ddaccordion.js, first do a search and replace, replacing all occurences of $ with $j. Then, and only then, add the below to the top of the file:

    Code:
    var $j = jQuery.noConflict()
    Doing that will remove the main source of conflict. Other issues may or may not remain.
    Last edited by jscheuer1; 10-31-2008 at 05:00 AM. Reason: spelling
    - John
    ________________________

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

  3. #3
    Join Date
    Oct 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks for posting a reply so quickly, John.

    Unfortunately, as I mentioned in my initial posting, I had already attempted that fix based on what you had said in another thread (http://www.dynamicdrive.com/forums/s...ad.php?t=37797). Doing this had no effect at all on the page.

    I did make another attempt to remedy the problem based on your reply to my initial posting, hoping that I had overlooked something, made an incorrect adjustment, etc. However, everything turned out the same: the conflict remains and the accordion menu and Lightbox elements continue to "cancel each other out."

    Are there other adjustments that you could suggest I try?

    Thanks again for your help.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,000
    Thanks
    44
    Thanked 3,198 Times in 3,160 Posts
    Blog Entries
    12

    Default

    I'm really not sure what the problem is, but I did get this somewhat cryptic error message in FF 3.03:

    Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMViewCSS.getComputedStyle]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://creativemerc.com/testing/dvda...-1.2.6.pack.js :: anonymous :: line 11" data: no]
    Source File: http://creativemerc.com/testing/dvda...-1.2.6.pack.js
    Line: 11
    I tried a number of things. What worked was upgrading to Lightbox 2.04a as described in the post you are referring to.

    Lightbox 2.04a:

    http://www.dynamicdrive.com/forums/s...470#post163470

    lightbox2.04a.zip:

    http://home.comcast.net/~jscheuer1/s...htbox2.04a.zip
    Last edited by jscheuer1; 10-31-2008 at 05:14 AM. Reason: add link to archive of lb2.04a
    - John
    ________________________

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

  5. The Following User Says Thank You to jscheuer1 For This Useful Post:

    curavon (10-31-2008)

  6. #5
    Join Date
    Oct 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Resolved!

    Thanks, John -- that did the trick.

    I had been thinking that I was using the latest Lightbox...thanks for pointing out that I was one digit off...

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
  •