jQuery Roundup: New Sizzle, HubInfo, Select2

2012-07-10 00:00:00 +0100 by Alex R. Young
Note: You can send your plugins and articles in for review through our contact form or @dailyjs.

The New Sizzle

In The New Sizzle, Timmy Wilson explains how jQuery's revised CSS selector engine works. Timmy has compared it to other selector engines, and shows how the new implementation differs to the previous version.

The part about extensibility is promising:

... there are a couple changes that make Sizzle even more extensible. Now with the parser compiling a function of functions, you can receive more information when creating your custom selector. Sizzle.compileis exposed so you can cache your selectors before they get used. While compiling is still very fast without caching, you can make sure that step is skipped before the selection is ever run.


HubInfo (GitHub: jgallen23 / hubinfo, License: MIT) by Greg Allen displays a GitHub repository widget. It comes bundled with CSS, so it's easy to get something looking good straight away with a small amount of JavaScript:

  user: 'alexyoung'
, repo: 'dailyjs'

The hubInfo method returns an object that will fire a render event. The project's documentation shows this being used to add a Twitter share button.


Select2 (GitHub: ivaynberg / select2, License: Apache 2.0) by Igor Vaynberg is a select box replacement that features a similar style to the popular Chosen library. Unlike Chosen, the author has made Select2 work better with large data sets -- results can be paginated, and infinite scrolling is supported.

There's an active community of Select2 users at the Select2 Google Group, and there's lots of demos and documentation on the project's homepage.