treehouse : what would you like to learn today?
Web Design Web Development iOS Development

help w/ jquery conflict

  • I'm trying to get the jQuery lightbox plugin to work, but it seems to be conflicting with the jQuery for our dropdown menu...I looked at the scripts that both things need; the menu is using 1.3.2 and the lightbox seems to be using 1.2.3.

    I assumed that the newer version would work for both things, but no dice. I can only get one or the other to work by removing one of the calls to the jQuery (1.3.2 or 1.2.3).

    Here is one of the pages where the lightbox is used: http://www.wildfiremarketinggroup.com/our-logo-design/

    Does anyone have an idea what I can do here?
  • Try loading the lightbox.js plugin after jquery.js
  • No, that's not it. There the jQuery lightbox uses jQuery 1.2.3, the menu uses jQuery 1.3.2 - that is the conflict. They don't work together and I don't know how eliminate the need for one of them.
  • Hmm, something else is messing it up. I just downloaded the latest version of the light box and swapped the jQuery version 1.2.3 with the latest and it worked perfectly.

    Try putting the lightbox-0.5.min.js script tag after the jquery script tag.
  • Hmm...odd. It seems to be working fine now, but everything seems to be the same as it was.