Results 1 to 5 of 5

Thread: Different Jquery Versions on same site

  1. #1
    Join Date
    Jul 2010
    Posts
    24
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default Different Jquery Versions on same site

    I was wondering how to implement 2 Jquery versions on the same page. I wish to use Versions 1.3.2 and 1.5.1.1. The reason being that certain the plugins I'm using uses to different versions. Please any help would be much appreciated. Thanks

    Mike

  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 latest nightly build of jQuery is 1.4.3pre. So either you have a typo, or you're mistaken about that 1.5.1.1 version. That actually sounds like a designation for a UI unit or a plug in. In any case, anything that ran under 1.3.2 will run, and more efficiently, under 1.4.2 - the latest official release version.

    What you ask can be done, but I question whether or not that's what you really need.

    If you want more help:

    Please post a link to a page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

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

  3. #3
    Join Date
    Jul 2010
    Posts
    24
    Thanks
    5
    Thanked 0 Times in 0 Posts

  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

    That's jQuery 1.3.2 and 1.4.2 on the page and Prototype 1.5.1.1. You also have Spry on the page.

    You only need one jQuery and 1.4.2 is it. You can replace the first call to 1.3.2 with one to 1.4.2 and remove the second call to 1.4.2. But (if you're keeping LightWindow) you must put jQuery into noConflict mode for Prototype and jQuery to both work on the same page. When you do that, some of the code you are using that depends upon jQuery will need changes in order to work.

    When I get more time (and if you haven't followed the below advice, which is a better solution), I'll look into how extensive those changes will need to be. If it's not too much, I'll give a specific solution. The presence of Spry might be a deal breaker though. Hopefully not. There are other scripts. You should really consider using ones that only require one library. Right now you have three (Spry, Prototype, and jQuery), four if you include the two versions of jQuery.

    Fancybox (jQuery based) can do pretty much what LightWindow can, so you could get rid of LightWindow and all of its support files. Just that and switching over to only one version of jQuery (make sure not to add another copy/version of jQuery when installing Fancybox) as indicated above would probably take care of things, assuming Spry is not an issue, which it doesn't look to be. However, it looks like all you need Spry for is a collapsible panel. jQuery can probably do that as well, you just have to find or write the code for that in jQuery.

    Just make sure that the one external tag to jQuery is to version 1.4.2 and comes before all other scripts that use jQuery.
    - 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:

    spookymix (09-28-2010)

  6. #5
    Join Date
    Jul 2010
    Posts
    24
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the solution!

    I'm going to go the fancybox route and use one version of JQuery...1.4.2. Thanks again you're the best!

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
  •