A pure-JavaScript CSS selector engine
designed to be easily dropped in to a host library.
Sizzle supports virtually all CSS 3 selectors - this even includes some parts that are infrequently implemented such as escaped selectors (".foo\\+bar"), Unicode selectors, and results returned in document order. There are a few notable exceptions to the CSS 3 selector support (the reasoning for this decision can be found here):
* :root
* :target
* :nth-last-child
* :nth-of-type / :nth-last-of-type / :first-of-type / :last-of-type / :only-of-type
* :lang()
In addition to the CSS 3 selectors Sizzle supports the following additional selectors or conventions.
John Resig is working on a new selector engine called Sizzle. 4x faster in Firefox 3, 3x faster in Opera 9, 1.5x faster in Safari 3 than the other major JavaScript libraries.
PhantomJS is a headless WebKit scriptable with a JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG.
11. Use jQuery’s noConflict() method to rename the jQuery object when working with multiple frameworks:
Many JavaScript frameworks use the “$” symbol to reference the framework. If you use multiple frameworks in your project, use the jQuery.noConflict() method to release the “$” object and assign jQuery to a custom-named object:
12. Use shorthand for the $(document).ready() event: