dbinott
dbinott

Reputation: 911

Working with multiple jQuery libraries and Prototype

Ok, i saw some other posts about this sort of thing, but not exactly related. This is not what I want to do, but need to do unfortunately.

We have in this order right now
Prototype 1.6
jQuery 1.2.6 with noConflict on jQuery with j

I need to add jQuery 1.4.2 in that mix as well. It will always be the last one loaded. No option.

Is there anyway i can do this currently?

I know this is not good, yada, yada, but it has to be done for now unfortunately.

Upvotes: 0

Views: 298

Answers (3)

RationalGeek
RationalGeek

Reputation: 9599

I'm guessing the answers to this question will help you. It seems to be a similar situation.

Is it possible to load multiple different version of jQuery on the same page?

Upvotes: 1

Steven Dorfmeister
Steven Dorfmeister

Reputation: 200

Not sure I understand how the order works unless of you have a loop waiting for the load, because I think the script includes are asynchronous.

You can have Prototype and jquery coexit if in jquery you safely wrap your jquery code in a:

(function($){

   //jQuery goodness

})(jQuery); 

Upvotes: 1

C Bauer
C Bauer

Reputation: 5103

The order they are on the page is how they will be loaded, however making sure they don't conflict and demolish eachother is a completely different ballgame.

Whatever situation is causing this, you might want to just start from scratch.

Upvotes: 0

Related Questions