Jump to content

Recommended Posts

Hi,

 

Firstly, I'm not a javascript programmer!

 

I've got two scripts running on a page, one using the jquery library and the other using the prototype library.

 

Problem is, they're clashing with each other. I can get one or the other working by putting the script link in front of the other but can't get them both working together.

 

Anyone able to help? I've looked at http://docs.jquery.com/Using_jQuery_with_Other_Libraries but it's all goblidook!

 

Cheers

 

Simon

Link to comment
https://forums.phpfreaks.com/topic/134369-jquery-and-prototype-clash/
Share on other sites

  • 2 years later...

Pet hate: Topic what was required, problem similar, answer partial. No one comes back to state how the issue was resolved. Please repay helpers by posting the solution!

The last reply was from 2008.  I advise you to create a new thread for your issue.

I totally get that, of course I do, but a historic thread with solutions is better that lots of recent threads that end mid way through. I am not complaining, just making a point, I googled the query and this thread came up. Anyone hoping to find the answer from it will be disappointed like I was. - Just sayin' :)

I totally get that, of course I do, but a historic thread with solutions is better that lots of recent threads that end mid way through. I am not complaining, just making a point, I googled the query and this thread came up. Anyone hoping to find the answer from it will be disappointed like I was. - Just sayin' :)

Have you even looked in the documentation?  It doesn't get much clearer than that...

When using two different libraries in Javascript, a classic example is Prototype and jQuery, you should 'relinquish' the $ to the Prototype library by using this line (after you import):

jQuery.noConflict();

From now on, use '$' for Prototype methods i.e. $("div").hide(); and 'jQuery' for jQuery methods i.e. jQuery("div").hide();

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.