simonp Posted November 26, 2008 Share Posted November 26, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/134369-jquery-and-prototype-clash/ Share on other sites More sharing options...
RichardRotterdam Posted November 26, 2008 Share Posted November 26, 2008 Which part you dont understand? Quote Link to comment https://forums.phpfreaks.com/topic/134369-jquery-and-prototype-clash/#findComment-699806 Share on other sites More sharing options...
simonp Posted November 26, 2008 Author Share Posted November 26, 2008 Cheers Dj Kat - I did read that but didn't understand it Can you give me a pointer? Cheers Simon Quote Link to comment https://forums.phpfreaks.com/topic/134369-jquery-and-prototype-clash/#findComment-699807 Share on other sites More sharing options...
RichardRotterdam Posted November 26, 2008 Share Posted November 26, 2008 what it says is that you have can replace the $() of all jquery calls to the jQuery() function can you show a bit of code on your page i'll give an example with that Quote Link to comment https://forums.phpfreaks.com/topic/134369-jquery-and-prototype-clash/#findComment-699808 Share on other sites More sharing options...
MikeMac Posted June 17, 2011 Share Posted June 17, 2011 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! Quote Link to comment https://forums.phpfreaks.com/topic/134369-jquery-and-prototype-clash/#findComment-1231089 Share on other sites More sharing options...
Maq Posted June 17, 2011 Share Posted June 17, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/134369-jquery-and-prototype-clash/#findComment-1231093 Share on other sites More sharing options...
MikeMac Posted June 17, 2011 Share Posted June 17, 2011 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' Quote Link to comment https://forums.phpfreaks.com/topic/134369-jquery-and-prototype-clash/#findComment-1231101 Share on other sites More sharing options...
Maq Posted June 17, 2011 Share Posted June 17, 2011 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(); Quote Link to comment https://forums.phpfreaks.com/topic/134369-jquery-and-prototype-clash/#findComment-1231110 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.