Author Topic: Conflict with a different jquery script with lightbox  (Read 2229 times)

Offline mgeene

  • Posts: 148
Conflict with a different jquery script with lightbox
« on: January 18, 2016, 03:08:24 PM »
Hi Is there a solution for a conflict between 2 verions of jquery scripts?
In my template i need jquer 1.8.2 and the lightbox of bakery needs 1.7.1 and those 2 don't like each other.

Is there a solution? Maby updating lightbox, i try but it didn't work.

Thanks for your reply.

Offline dbs

  • Betatester
  • **
  • Posts: 8192
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Conflict with a different jquery script with lightbox
« Reply #1 on: January 18, 2016, 03:12:33 PM »
Hi, the problem is not the lightbox but the 2 jQuery-libs.
Try to deactivate one of them.

freeSbee

  • Guest
Re: Conflict with a different jquery script with lightbox
« Reply #2 on: January 18, 2016, 04:12:03 PM »
Hi mgeene

To avoid conflicts Bakery makes use of conditional loading. It only loads its own jQuery if the jQuery object is not existing yet.

Regards Christoph

Offline mgeene

  • Posts: 148
Re: Conflict with a different jquery script with lightbox
« Reply #3 on: January 18, 2016, 04:42:56 PM »
Hi Christoph,

In the template i found out that Bakery uses jquery 1.7.1 for the lightbox function of the images on the product page and i use jquery 1.8.2 in the template.

Offline mgeene

  • Posts: 148
Re: Conflict with a different jquery script with lightbox
« Reply #4 on: January 18, 2016, 04:57:00 PM »
is it possible that Lightbox and BX slider having a conflict?

freeSbee

  • Guest
Re: Conflict with a different jquery script with lightbox
« Reply #5 on: January 18, 2016, 08:38:18 PM »
Hi mgeene

In Bakery v1.6.4 the Lightbox2 js was updated to version 2.5.1. For further information please see the development history at the bakery info.php file.

 The Lightbox2 v2.5.0 switched to jQuery from Prototype and Scriptaculous.

I am surprised to find that …
  • Your page still loads prototype.js and scriptaculous.js. prototype.js and scriptaculous.js are not used any more and can conflict with jQuery.
  • Your Lightbox2 is v2.04 - should be at least 2.5.1.
  • In your template you are loading jQuery two times (v1.7.1 and v1.3.2)

Did you really success in updating Bakery to the latest version?
I suppose that some files might not have been overwritten by the WB upgrade routine.

A. I suggest to make sure that all Bakery files really make part of the latest version of Bakery.
B. Additionally and if you like to, you can download the latest version of Lightbox2 here and upgrade it at /bakery/lightbox2:
    Download: http://lokeshdhakar.com/projects/lightbox2/

Regards Christoph

Offline mgeene

  • Posts: 148
Re: Conflict with a different jquery script with lightbox
« Reply #6 on: January 25, 2016, 08:10:16 PM »
Hi Christoph,

You are right, the upgrade did not update all the files, i did it again and thats the solution.
Thank you for your time en advise.

Regards Menno

 

postern-length