UNPKG

emile

Version:

no-thrills stand-alone CSS animation JavaScript framework

67 lines (51 loc) 1.89 kB
Q('wery') - The Tiny Selector Engine ----- Qwery is a 1k *blazing fast* query selector engine allowing you to select elements with CSS1 & CSS2 selectors (including [attribute selectors](http://www.w3.org/TR/css3-selectors/#attribute-selectors)). 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 // variations #foo.bar.baz div#baz.thunk a[-data-info*="hello world"] strong #thunk[title$='huzza'] Contexts ------- Each query can optionally pass in a context qwery('div', node); // existing DOM node or... qwery('div', '#foo'); // another query Browser Support --------------- - IE6, IE7, IE8, IE9 - Chrome 1 - 10 - Safari 3, 4, 5 - Firefox 2, 3, 4 Build ----- Qwery uses [JSHint](http://www.jshint.com/) to keep some house rules as well as [UglifyJS](https://github.com/mishoo/UglifyJS) for its compression. For those interested in building Qwery yourself. Run *make* in the root of the project. Tests ----- $ open tests/index.html Note ---- Qwery uses querySelectorAll when available. All querySelectorAll default behavior then applies. Ender support ------------- Qwery is the default selector engine for [Ender](http://ender.no.de). However to use it in a custom builds of Ender you can include it as such: ender -b qwery[,mod2,mod3,...] Contributors ------- * [Dustin Diaz](https://github.com/ded/qwery/commits/master?author=ded) * [Jacob Thornton](https://github.com/ded/qwery/commits/master?author=fat) * Follow our software [@dedfat](http://twitter.com/dedfat)