multiple javascript libraries?

64 views Asked by At

Ok so i am using jQuery 1.5 and Google Data API library in one page, and the jQuery is not firing at all. Are they interfering with each other and if so how do i fix it?

2

There are 2 answers

0
JasCav On BEST ANSWER

In addition to using noconflict() as Crayon suggested (which is a good answer, +1), you can also use jquery instead of the $ to make calls to jquery. So, for example...instead of...

$(function() { ... });

you would do

jQuery(function() { ... });

This avoids any conflicts between other libraries that use the $.

0
CrayonViolent On

You can use jQuery's noconflict() to give it its own namespace

http://api.jquery.com/jQuery.noConflict/