How to use two versions of jquery after jquery is updated

Source: Internet
Author: User

Jquery announced that it does not support earlier ie versions.

It seems like the end of the world has come.

 

Actually nothing. It doesn't matter if you use the old version to continue providing support for IE.

It won't force update, it won't block applications, and it won't take you to court because of several API infringements.

 

Multiple jquery is not a problem. The conflict between jquery and prototype has long been a perfect solution.

Noconflict.

 

Pay attention to the usage.

For example:

 

<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
< Html Xmlns = "Http://www.w3.org/1999/xhtml" >
< Head >
< Title > </ Title >
< Script Type = "Text/JavaScript" SRC = "Scripts/jquery-1.4.1.min.js" >
</ Script >
< Script Type = "Text/JavaScript" >
( Function (){

VaR V14 = $. noconflict ( True );
Window. $ = {V14: V14 };
})();
</ Script >
< Script Type = "Text/JavaScript" SRC = "Scripts/jquery-1.7.2.min.js" > </ Script >
< Script Type = "Text/JavaScript" >
( Function (){
VaR V17 = $. noconflict ( True );
Window. $. v17 = v17;
})();
</ Script >
< Script Type = "Text/JavaScript" >
// V14 code
( Function ($ ){

}) (Window. $. V14 );

// v17 Code
( function ($) {

}) (window. $. v17);
script >

</Head>
<Body>
</Body>

</Html> 

 

In this way, all conflicts can be solved.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.