Front-end developers know that there are many jquery versions, and there is a lot of conflict between them.
For example, when I first came to this company, my back-end buddy used jQuery 1.3.2. I went there, and my buddy hasn't updated it for a long time.
All the plug-ins I wrote are the latest jquery1.7.1.
Poor compatibility. Read books based on previous documents. Find a peaceful coexistence
<Script type = "text/javascript" src = "http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"> </script>
<Script type = "text/javascript">
Var j = jQuery. noConflict (true );
</Script>
<Script type = "text/javascript" src = "http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"> </script>
<Script type = "text/javascript">
$ ("Document"). ready (function (){
Alert ("jquery ");
})
J ("document"). ready (function (){
Alert ("javascript ");
})
</Script>
In this way, you can first grant $ permission to another jquery library to avoid conflicts between $ objects in different jquery versions. The above code will pop up two pop-up boxes to remove conflicts between different versions.
After running this function, you can only use j to access jquery/1.3.2 /. For example, to use $ ("div span"), replace it with j ("div span "). In addition, the jquery library is in normal use,
Author: qishuai1986