If you have other requirements and want to continue using the original $() without conflicting with other class libraries, there are two solutions
one:
jQuery.noConflict();
jQuery(function($)
{
$("p").click(function() //You can use the $() method of the jquery class library to continue within the function
{
alert($(this).text());
})
})
var JsCOM_cr = $("cr"); // Outside the function, you can still use the $() method of JsCOM.js
Second:
jQuery.noConflict(); //Will The control rights of the variable $ are transferred to other class libraries. When using the $ symbol of the jquery class library, please use jQuery("#id");
(function($) { //Define the anonymous function and set the formal parameters to $
$(function() { //The $ inside the anonymous function is jQuery
$("div").click(function() {//Continue to use the $() method
alert($ (this).text());
})
})
})
(jQuery); //Use anonymous function and pass actual parameters jQUery
alert($("cr ")); //Using the $() function in the jsCOM.js class library