Nov 8, 2018

How to choose Jquery version according to IE version

In the head:

<!--[if lt IE 9]>
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" type="text/javascript"></script> 
 <![endif]-->

 <!--[if gt IE 8]>
        <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js" type="text/javascript"></script> 
 <![endif]-->

By this way, IE8 and lesser versions will use jQuery 1X versions, IE9 and greater will use JQuery 2x versions.

You can customize it according to your testing. For example, for the following, IE9 and lesser versions will use jQuery 1X versions, IE10 and greater will use JQuery 2x versions.

<!--[if lt IE 10]>
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" type="text/javascript"></script> 
 <![endif]-->

 <!--[if gt IE 9]>
        <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js" type="text/javascript"></script> 
 <![endif]-->