Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Any way I can use two different versions of jquery on one page?

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #37115
    LukeDaly
    Participant

    Hey guys, have just run into a problem on a new site, I know that one version of jQuery cancels out another, but I need the two too work, is this possible? if so how? thankyou, Luke

    #98865
    karlpcrowley
    Participant

    Why do you need both to run? Could you not just let the later version of the two do the work?

    #98868
    Senff
    Participant

    No idea why you’d want that, and I definitely not recommend it (I’m sure there will be conflicts!), but you might want to try this. Say you’re loading two jQuery library files (jquery-1.js and jquery-2.js).

    1. At the end of jquery-1.js, add this line: j1$ = jQuery.noConflict();

    2. At the end of jquery-2.js, add this line: j2$ = jQuery.noConflict();

    3. To do anything with the first library, instead of something like $('#blah').show();, use j1$('#blah').show();

    4. To do anything with the second library, instead of something like $('#blah').show();, use j2$('#blah').show();

    Haven’t tested it myself, but see if it works for you.

    #98870
    LukeDaly
    Participant

    Sorry should have explained better in my first post, I’m wanting to use jparallax, and it only works well with 1.2.6. Of course im wanting to use the latest version with everything else. Ill be sure to try that out after work. Thanks

    #98871
    karlpcrowley
    Participant

    The version of jParallax on GitHub supports version 1.6.1
    https://github.com/stephband/jparallax

    I’m sure it would work with the latest version, it just looks like it hasn’t been updated in a while

    #98872
    LukeDaly
    Participant

    why thankyou :D never saw that :)

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘CSS’ is closed to new topics and replies.