问题描述:

So recently Jquery released version 2 which stopped supporting older browsers. Minified and with a custom build it is much more faster and smaller (40kb) as opposed to 96 kb version 1.9. The issue is that it doesnt support older browsers so I am forced to use conditional comments to include 1.9 for only ie8 and below. However, as I also need jquery 2.2 for the modern browsers on my page, how do I prevent old ie versions to ignore it?

Thanks in advance

网友答案:

You can find the answer on the jQuery website here: http://blog.jquery.com/2013/03/01/jquery-2-0-beta-2-released/

Use the conditional comments as:

<!--[if lt IE 9]>
<script src="jquery-1.xjs"></script>
<![endif]-->
<!--[if gte IE 9]><!-->
<script src="jquery-2.x.js"></script>
<!--<![endif]-->
网友答案:

Put a conditional load around 2.2 as well

<!--[if !IE]> -->
相关阅读:
Top