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
Related Articles
JQuery And Dojo Foundations To Merge
jQuery Adopts Semantic Versioning
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, Facebook, Google+ or Linkedin.
W3C Adopts A New Logo
31/10/2025
The World Wide Web Consortium (W3C) is rolling out a new logo following the release of strategic objectives to support W3C's roadmap and the formation in 2023 of W3C as a non-profit, public-interest o [ ... ]
Mico - A Personality For Copilot
24/10/2025
Microsoft has designed an animated face for Copilot, its ubiquitous AI Assistant. Is Mico, whose name rhymes with "pico", going be a worthy successor to Clippy, the highly annoying paperclip that trie [ ... ]
- The Pico Gets Zephyr And Rust Support
- IBM Launches Granite Version 4.0 and Granite-Docling
- AI Improves Devs Skills, Enhances Their Roles
- Next.js 16 Adds Cache Components
- Julia 1.12 Adds Trim Feature
- George Boole, Boolean Logic and Computing
- Codacy Provides Free AI- Risk Assessment
- Google AI Studio Does Angular
- Windows XP Crocs Now On Sale
- PyTorch Team Introduces Cluster Programming
- DH2i Launches DxEnterprise For SQL Server 2025
- AI Champion Ship Now Open
- Missing The Point Of LLMs
Comments
or email your comment to: comments@i-programmer.info