To avoid conflicts you can warp JQuery function in some JQuery noconflict tags; see the following example
Normally you use the following code
$(document).ready(function() {
alert("test");
})
Above code will not work if you find another JavaScript code conflicts with this
So you can use the following code
$(document).ready(function() {
alert("test");
})(jQuery);
I think this is the easy way to achieve the same result
jQuery.noConflict()(function(){
// code using jQuery
});