Results 1 to 4 of 4

Thread: Lightbox and Accordion Content script conflict

  1. #1
    Join Date
    May 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Lightbox and Accordion Content script conflict

    1) Script Title:
    Accordion Content script (v2.0)
    Lightbox image viewer 2.03a

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...daccordion.htm
    http://www.dynamicdrive.com/dynamici...box2/index.htm
    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,
    Yaron

  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

    The two scripts, though they can be made to work together are basically incompatible. Get rid of Lightbox. Use Slimbox2 instead. See:

    http://www.dynamicdrive.com/forums/blog.php?b=247

    for important details.
    - John
    ________________________

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

  3. #3
    Join Date
    May 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Problem SOLVED !!!!

    Updating prototype to version 1.7.0 from google's CDN.
    https://ajax.googleapis.com/ajax/lib...0/prototype.js

    This solved the conflict between jquery and prototype

  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

    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.
    - 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
  •