Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

a query selector engine

tree: 4453beca27

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 build
Octocat-spinner-32 config
Octocat-spinner-32 src
Octocat-spinner-32 tests
Octocat-spinner-32 vendor
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .gitmodules
Octocat-spinner-32 Makefile
Octocat-spinner-32 Makefile.js
Octocat-spinner-32 README.md
Octocat-spinner-32 qwery.js
Octocat-spinner-32 qwery.min.js
README.md

Qwery - The Tiny Selector Engine

Qwery is a 1k selector query engine allowing you to select elements with CSS1 & CSS2 queries, with the exception of (commonly used) attribute selectors from CSS3.

Acceptable queries

// basic
#foo // id
.bar // class
#foo a // descendents
#foo a.bar element attribute comibination

// attributes
#foo a[href] // simple
#foo a[href=bar] // attribute values
#foo a[href^=http://] // attribute starts with
#foo a[href$=com] // attribute ends with
#foo a[href*=twitter] // attribute wildcards

// combos
div,p

Contexts

Each query can optionally pass in a context

qwery('div', node); // existing DOM node or...
qwery('div', '#foo'); // another query

Build

Qwery uses JSHint to keep some house rules as well as UglifyJS for its compression. For those interested in building Qwery yourself. Run make in the root of the project.

Tests

point your browser at qwery/tests/index.html

Note

Qwery uses querySelectorAll when available. All querySelectorAll default behavior then applies.

Contributors

Something went wrong with that request. Please try again.