JQuery 1.6 Releases performance improvements, while containing a large number of disruptive changes _jquery

Source: Internet
Author: User
Tags time interval fast web

Some important improvements in the new version:

    • The attr (), Val () and data () methods have better performance;
    • Boolean attributes are supported in the attr () method;
    • A hook function is added to allow extensions to the attr () and Val () methods;
    • The map () method adds support for objects (mapping the properties of JavaScript objects to functions)
    • Allows the use of relative values ("+ =", "=") to update the CSS;
    • Add Deferred.always (), Deferred.pipe () method, reduce the amount of code, improve the readability of the Code;
    • Sync Animation – All animations are now synchronized to the same time interval. With the new browser features, the animation is also smoother;
    • Find (), closest ( ) and is () can receive all DOM elements and jquery objects as parameters.

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

Unfortunately, some of the disruptive changes are included, and the team has highlighted them in separate chapters in the official update:

tr>
change JQuery 1.5.2 Example JQuery 1.6 Example
data () method creates the hump format using dashes.
data-max-value= "15" to create {max-value:15} data-m Ax-value= "15" creates {maxvalue:15}



 
che Ckbox.attr ("Checked") returns an empty string.
to determine whether or not to select, use the
$ (this). Prop ("checked") or
$ (This) (": Checked") in an event handler.

The second change, if not unexpected, will affect the existing projects that are intended to be upgraded to 1.6.

This version was released 3 months after the release of 1.5 and 1 months after the release of 1.5.2. At present, 1.7 of the work has begun, the jquery team has accepted the functional proposal .

JQuery is a JavaScript library for fast Web development that simplifies HTML document traversal, event handling, animations, and Ajax interactions.

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: info-contact@alibabacloud.com 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.