您的位置:首页 - jQuery
最流行的JavaScript库,jQuery不再支持IE旧版本
直到JQuery2.0的发布,流行的jQuery JavaScript库到了一个重要里程碑。2.0版本比前任版本在大小上缩减了12%,但是更大的新闻是,jQuery 2.0不在对IE6,7,8三个版本进行支持。

七年前jQuery的诞生,开始让开发者更简单的操作HTML和编写JavaScript,jQuery的跨浏览器特性,更是很快受到了广大开发者的青睐。根据去年的一项调查显示,粗略估计,网络上一半的站点都在使用jQuery。

停止对旧版IE的支持,是否会改变jQuery的使用率?答案也许是不会。如果你的网站需要维护对IE8或者低版本(或者是IE9和IE10在兼容模式下运行),你只需要沿用jQuery1.9或者以下版本。

“jQuery2.0主要用于现代网络,”jQuery的Dave Methvin在Query Foundation网站上写道,“我们有jQuery1.x版本处理旧版浏览器,并且期望他可以支持好几年。”

如果你想要同时兼容新旧版浏览器,你可以使用条件注释,让2.0在新浏览器上使用,而旧版本使用1.9,但是更简单的方法则是沿用 jQuery1.x版本。至少目前2.0的主要用例,对IE的支持是不再考虑范围内了,而是Chrome或者Firefox的附加组件,PhoneGap 应用程序或是node.js。


原文:

Web’s Most Popular JavaScript Library Drops Support for Older Versions of IE


The popular jQuery JavaScript library has hit a major milestone with the release of jQuery 2.0. The 2.0 release is some 12 percent smaller than its predecessor, but the big news is that jQuery 2.0 drops support for Internet Explorer 6, 7 and 8.
Created to simplify the process of writing JavaScript and manipulating HTML, jQuery began life a mere seven years ago, but quickly found favor with developers sick of dealing with cross-browser JavaScript hassles. According to one survey published last year, jQuery turns up on roughly half of all sites on the web.

Will dropping support for older versions of IE change that? Probably not. If your site needs to maintain support for IE 8 and below (or even IE 9 and 10 running in compatibility mode) you’ll just need to stick with jQuery 1.9 or below.

“jQuery 2.0 is intended for the modern web,” writes jQuery’s Dave Methvin on the Query Foundation website. “We’ve got jQuery 1.x to handle older browsers and fully expect to support it for several more years.”

If you want the best of both worlds you can use a conditional comment to serve 2.0 to newer browsers and 1.9 to older ones, but the far easier way to go is sticking with jQuery 1.x. For now at least the primary use case for the 2.0 line is situations where IE support isn’t a consideration — think Chrome or Firefox add-ons, PhoneGap apps or node.js.

出处:http://www.webmonkey.com/2013/04/webs-most-popular-javascript-library-drops-support-for-older-versions-of-ie/
本站导航
相关文章
柯乐义 Copyright© keleyi.com