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 querySelectorAll or matchesSelector methods. 

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.


More Information

JQuery Blog 

JQuery Downloads

Related Articles

JQuery 3 in Alpha

JQuery And Dojo Foundations To Merge

jQuery Adopts Semantic Versioning

JQuery 1.11 and 2.1 Released       

jQuery 2.0 Leaves Behind Older IE Browsers


To be informed about new articles on I Programmer, sign up for our weekly newsletter,subscribe to the RSS feed and follow us on, Twitter, FacebookGoogle+ or Linkedin



Akka Adds Database Sharding Support

Lightbend, the company behind Akka, has released Akka version 24.05. Lightbend produces cloud-native microservices frameworks while Akka allows for building distributed applications.

Google Reduces Support For Python, Dart And Flutter

There are many reports that Google has removed people from its Python, Dart and Flutter teams and possibly more. What does this say about relying on Google as a source of technology for your projects? [ ... ]

More News


raspberry pi books



or email your comment to: comments@i-programmer.info

Last Updated ( Friday, 15 January 2016 )