|JQuery 2.2 Released|
|Written by Kay Ewbank|
|Wednesday, 13 January 2016|
The latest version of JQuery has been released with better support for cross-browser development.
Two new versions have been released, jQuery 1.12.0 and 2.2.0, both being the last of their respective branches ahead of the release of JQuery 3.0.
The developers say that:
"Since jQuery 3.0 will have some breaking changes, we will continue to support 1.12 and 2.2 after jQuery 3.0 is released, but only with patches for major regressions."
The current new versions have some new non-breaking features, along with performance Improvements. The improved performance comes via the selector engine, which will now immediately use precompiled Sizzle selectors when the selector cannot be processed by the native
The new features include support for SVG class manipulation. The developers say:
"While jQuery is a HTML library, we agreed that class support for SVG elements could be useful."
The new support means you'll be able to call the .addClass(), .removeClass(), .toggleClass(), and .hasClass() methods on SVG. jQuery now changes the class attribute rather than the className property, which also makes the class methods usable in general XML documents.
Other changes add a new signature to the ajax shortcuts that takes a single object containing options, and support has been added for the symbol type and iterators. This means that “Symbol” will be detectable with jQuery.type, and jQuery objects can be iterated with for-of where supported.
A new hook has been added for filtering HTML that is passed to jQuery DOM manipulation methods like .html(), .append(), and .replaceWith(). The default prefilter translates single tags to XHTML-compatible tags, so you'll be able to bypass certain edge cases and remove scripts.
The final improvement is to make it more obvious that jQuery.unique() also sorts. This has been done by changing the name to uniqeSort. jQuery.unique will still exist, but jQuery.uniqueSort will become the documented method. The developers point out that this method is still only intended to sort DOM elements in document order; it is not a general sorting method.
or email your comment to: email@example.com
|Last Updated ( Friday, 15 January 2016 )|