JQuery 1.6 has just been released with several performance and cross-browser compatibility improvements and major rewrite of the Attribute module.
Some major improvements in the new release -
-
Support for Boolean attributes in attr() method
-
Hooks added to allow extensibility for attr() and val() methods
-
map() method adds support for objects (to map properties of a JavaScript object to a function)
-
Ability to update CSS using relative values (“+=”, “-=”)
-
deferred.always(), deferred.pipe() added to reduce code and make it more readable
-
Synced animations – all animations are now synced to the same time-interval. Animations are also smoother using newer browser features
All these new features are explained in detail along with the entire list of bug fixes on the official blog post.
Unfortunately, there are also some breaking changes, and the team has put up a separate section highlighting them on their official update -
Changes | JQuery 1.5.2 e.g. | JQuery 1.6 e.g. |
data() method camel-cases data attributes with embedded dashes. |
data-max-value="15" creates { max-value: 15 } | data-max-value="15" creates { maxValue: 15 } |
Bifurcation between properties and attributes. attr() method cannot be used now to get property values. prop() and removeProp() methods introduced to handle property values | checkbox.attr("checked") returns (true) if checkbox is checked |
checkbox.attr(“checked”) returns empty string. Need to use $(this).prop("checked") or $(this).is(":checked") inside the event handler, this being the element clicked. |
The second change is especially expected to have impact on existing projects that decide to upgrade to 1.6.
This release comes just 3 months after 1.5 release and 1 month after the 1.5.2 release. Work has already started on 1.7 and the JQuery team is already accepting feature proposals.
JQuery is a JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.