Improved jquery 1.6 performance and a large number of disruptive changes

Source: Internet
Author: User

Some important improvements in the new version:

    • The ATTR (), Val (), and data () methods provide better performance;
    • The ATTR () method supports the Boolean attribute;
    • Added a hook function that allows extension of the ATTR () and Val () methods;
    • The map () method adds support for objects (ing JavaScript Object Attributes to functions)
    • You can use relative values ("+ =", "-=") to update CSS;
    • Added the deferred. Always () and deferred. Pipe () methods to reduceCodeIncrease the ease of coding;
    • Synchronous animation-now all animations are synchronized to the same time interval. The new browser function makes the animation smoother;
    • Find (), closest (), and is () can receive all DOM elements and jquery objects as parameters.

All these new features, along with the entire bug fix list, are described in detail in the official blog.

Unfortunately, this includes some destructive changes, which have been highlighted in separate sections in the official updates by the team:

Change Jquery 1.5.2 example Jquery 1.6 example
The data () method uses a broken number to create a camper format.
Data-max-value = "15" created {max-value: 15} Data-max-value = "15" created {maxvalue: 15}
Distinguishes property from attribute. Currently, the ATTR () method cannot be used to obtain the preperty value. To process the property value, the prop () and removeprop () methods are introduced. If the check box is selected, checkbox. ATTR ("checked") returns (true)

Checkbox. ATTR ("checked") returns an empty string.
To determine whether an event is selected, you must handle the eventProgramUsed in
$ (This). Prop ("checked") or
$ (This). Is (": checked ").

If nothing happens, the second change will affect the projects that intend to upgrade to 1.6.

This version was launched three months after 1.5 and one month after 1.5.2. At present, 1.7 of the work has started, and the jquery team has accepted the function proposal.

Jquery is a javascript library for rapid web development. It simplifies HTML document traversal, event processing, animation, and Ajax interaction.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.