DIV CSS 佈局教程網

 DIV+CSS佈局教程網 >> 網頁腳本 >> JavaScript入門知識 >> jQuery入門知識 >> JQuery常見問題 >> 最流行的JavaScript庫,jQuery不再支持IE舊版本
最流行的JavaScript庫,jQuery不再支持IE舊版本
編輯:JQuery常見問題     
直到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/
XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved