If you have other requirements, you want to continue to use the original $ (), but also need to be with other classes library does not conflict, there are two ways to solve
One
Jquery.noconflict ();
jquery (function ($)
{
$ ("P"). Click (function ()///The $ () method for the JQuery class library can be used within a function
{
alert ($ (this). Text ()) ;
})
})
var JSCOM_CR = $ ("Cr"); Outside the function, you can use the $ () method of the Jscom.js
Second:
Jquery.noconflict (); When you transfer the control of a variable $ to another class library, use jquery ("#id")
when using the $ symbol for the jquery class library. (function ($) {///define anonymous function and set the parameter to $ $
(function () {///The inside of the anonymous function is jquery
$ ("div"). Click (function () {//continue to use the $ () method
Alert ($ (this). Text ()),
})}
)
http://www.unitymanual.com/forum76.html Unity3d Game
(jquery);//Use anonymous functions and pass the argument jQuery
alert ($ ("Cr")); Using the $ () function in the Jscom.js class library
More Wonderful content: http://www.bianceng.cn/webkf/jquery/