Overview

Selector.js

Simple selector engine; supports id, class and tag selectors. IE6+ compatible.

Usage

$( selector, [context] );

When passed a valid selector, outputs an array of all matching elements (optionally constrained to a given context).

Examples

$("#some_id");
// [<div id="some_id" class="some_class some_other_class"></div>]

$("div.some_class");
// [<div id="some_id" class="some_class some_other_class"></div>]

$("div#some_id.some_class");
// [<div id="some_id" class="some_class some_other_class"></div>]