BT
x Your opinion matters! Please fill in the InfoQ Survey about your reading habits!

JQuery 1.6 Released With Performance Upgrades, Breaking Changes

by Roopesh Shenoy on May 06, 2011 |

 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 -

  • Better performance of attr(), val() and data() methods
  • 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
  • find(), closest() and is() can now take all DOM elements and JQuery objects as arguments

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. 

 

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Updates by Roopesh Shenoy

The team has just released update 1.6.1.

They are also working on JQuery color plugin v2, and have just released a beta version.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

1 Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT