Jump to content

cssQuery

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Pbb (talk | contribs) at 08:16, 8 March 2007 (corrected link to dean edwards, and added compu-prog-stub (as in prototype.js page)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
cssQuery Javascript Function
Developer(s)Dean Edwards
Stable release
TypeJavaScript Function
LicenseCreative Commons Licence
Websitedean.edwards.name


cssQuery() is a powerful cross-browser JavaScript function that enables querying of a DOM document using CSS selectors. All CSS1 and CSS2 selectors are allowed plus quite a few CSS3 selectors.

Usage

Syntax

elements = cssQuery(selector [, from]);

where selector (required) is a valid CSS selector and from (optional) is a document, element or array of elements which is filtered by selector.

The function returns a JavaScript array of elements. If there is no match, an empty array is returned.

Resources