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.