mini icon indicating copy to clipboard operation
mini copied to clipboard

A tiny selector engine; only the essentials

mini, a tiny selector engine

© James Padolsey

Dual licensed under the MIT and GPL licenses.

  • http://www.opensource.org/licenses/mit-license.php
  • http://www.gnu.org/copyleft/gpl.html

Read more: Introducing “mini”

Usage:

var pAnchors = mini('p > a'); // Returns an array.

for (var i = 0, l = pAnchors.length; i < l; ++i) {
    // Do stuff...
}

Supported Selectors:

  • tag
  • tag > .className
  • tag > tag
  • #id > tag.className
  • .className tag
  • tag, tag, #id
  • tag#id.className
  • .className
  • span > * > b