
Today finally a new release of jQuery version 1.9 has been released. Let's look at what innovations and changes we will see here.
')
JQuery 1.9 and jQuery 2.0 in beta have a similar API.
Removed some obsolete features like $ .browser.
JQuery 1.9 is still working on older versions of Internet Explorer 6, 7 and 8. But in JQuery 2.0, support will be discontinued. Due to this, it will work faster and weigh less.
Version 1.9 is already available on CDN jquery and will soon be available on Google and Microsoft CDNs.
For those who want to test their scripts on jQuery 2.0 Beta 1, you can use the jQuery CDN:
For verification, you can connect the jquery-migrate plugin. To see what changes may cause problems with your code. Regardless of which version of jquery you are using, do not forget to open the console to see the warnings or errors that jquery-migrate generates. Warnings start with the word "JQMIGRATE" and are listed in the plugin documentation. This will help you understand what is broken and how to fix it.
WHAT'S NEW IN 1.9
Simplified API: Many outdated and questionable features have been removed, as described in the update guide.
Updated .css () function: Now you can get all css values ​​by requesting an array with keys:
var dims = $("#box").css([ "width", "height", "backgroundColor" ]);
// { width: "10px", height: "20px", backgroundColor: "#D00DAD" }
Extensive cross-browser support for CSS3: JQuery 1.9 now supports the following CSS3 selectors in all browsers:: nth-last-child,: nth-of-type,: nth-last-of-type,: first-of-type, : last-of-type,: only-of-type,: target,: root, and: lang.
New method .finish: This method can be used to immediately complete all animations in the queue for an item.
Other fixes
AJAX# 12004: Added ajax.method method as an alias for ajax.type
# 12550: Fixed jQuery Ajax cache = false did not always work
ATTRIBUTES# 9905 :. RemoveAttr ("ID") no longer crashes in IE7
# 12048: [IE6 / 7/8] XML attribute set
# 12584: JQuery doesn’t serialize with one broken # 12600: jQuery ('select'). Is ('[value = "value"]') does not work consistently depending on the number of elements returned.
# 12945: Attr throws an IE9 exception on a flash object
# 13011: Setting the type attribute on input does not work as expected
BUILD# 12254: Reflected XSS
# 12725: Non-localized UTF-8 characters in intro.js
# 12741: incompatible end of line in official jQuery-1.8.2.js
CORE# 11737: Removed jQuery.sub
# 12134. HTML5 compilant data form implementations in $ fn.serialzeArray
# 12519: Public API methods should not have privat arguments
# 12840: Privat “pass” parameter in jQuery.attr and jQuery.access removed
# 13021: each () cannot work well with large objects
# 13075. Performance optimization $ .type
# 13076: Performance optimization (10-30%) for $ (“some-selector”)
CSS# 11938: jQuery.css should accept an array to get several properties
# 12990: “px” is automatically added to the column in CSS
# 13088. Under IE8, $ (selector) .attr ('style') always returns the string
Links
Official siteEntire list of changesMigration Guide