Jump to content

A little jquery tip (multiple versions)


Recommended Posts

Hi all

I was in the situation where i needed the 1.4.2 version of jquery, so i did some searching and came up with this solution that works like a charm!.

!)

If you dont have jquery on your own server, then add this line:
[removed][removed]

and put it ABOVE the 1.2.6 jquery string.

2) Add this line just beneath the 1.4.2 string:
[removed]
var $jq = jQuery.noConflict();
[removed]

3) So now when you have a function you just have to add jq after $ = jq.

ex:

$jq('.selector').live('click', function(){
//do something
});

Voila, now you can run multiple jquery versions with no problems, and add the latest and greatest.

Link to comment
Share on other sites

×
×
  • Create New...