qwery

blazing fast CSS3 query selector engine

57 个版本
安装
npm install qwery
yarn add qwery
pnpm add qwery
bun add qwery
README

Qwery

Qwery is a modern selector engine built on top of querySelectorAll giving you practical utility.

Deprecation Notice!

As of version 4.0, qwery no longer supports IE6 - IE8. If your application still requires this level of support, please see the final 3.x release.

Browser Support

  • IE9+
  • Chrome 1+
  • Safari 3+
  • Firefox 4+

Contexts

Each query can optionally pass in a context

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

Dev Env & Testing

npm install
make
open tests/index.html

Ender support

Qwery is the recommended selector engine for Ender. If you don't have Ender, install it, and don't ever look back.

npm install ender -g

Include qwery into your package.json

{
  "dependencies": {
    "qwery": "x.x.x"
  }
}

Ender bridge additions

// the context finder - find all p elements descended from a div element
$('div').find('p')

// join one set with another
$('div').and('p') // equal to $('div,p')

In most cases, if you're hunting for a selector engine, you probably want to pair Qwery with a DOM module. In that case qwery pairs quite nicely with Bonzo (a DOM util) and Bean (an event util). Add them to your Ender installation as such:

ender build qwery bean bonzo

Then write code like a boss:

$('<p>hello world</p>')
  .css({
    color: 'red',
    background: 'white'
  })
  .after('√')
  .bind({
    'click.button': function () {
      $(this).hide().unbind('click.button')
    }
  })
  .appendTo('body')

Giving back

Are you using this library in production? Consider leaving a tip to show your appreciation.

版本列表
4.0.0 2014-02-12
3.4.2 2014-02-12
3.4.1 2013-01-30
3.4.0 2012-11-26
3.3.11 2012-06-14
3.3.10 2012-06-08
3.3.9 2012-06-08
3.3.8 2012-05-16
3.3.7 2012-05-15
3.3.6 2012-04-24
3.3.5 2012-04-24
3.3.4 2012-03-27
3.3.3 2012-02-07
3.3.2 2012-01-13
3.3.1 2012-01-13
3.3.0 2012-01-09
3.2.2 2011-12-13
3.2.1 2011-12-12
3.2.0 2011-12-12
3.1.1 2011-11-16
3.0.0 2011-11-16
2.2.9 2011-11-15
2.2.8 2011-11-03
2.2.7 2011-10-04
2.2.6 2011-09-26
2.2.5 2011-09-19
2.2.4 2011-09-12
2.2.3 2011-09-12
2.2.2 2011-09-09
2.2.1 2011-09-07
2.2.0 2011-09-07
2.1.2 2011-06-22
2.1.1 2011-06-22
2.1.0 2011-06-22
2.0.0 2011-06-20
1.2.7 2011-06-10
1.2.6 2011-06-10
1.2.5 2011-06-10
1.2.4 2011-06-10
1.2.3 2011-05-22
1.2.2 2011-05-17
1.2.1 2011-05-16
1.2.0 2011-05-14
1.1.9 2011-05-13
1.1.8 2011-05-13
1.1.7 2011-05-12
1.1.6 2011-05-01
1.1.5 2011-05-01
1.1.4 2011-04-28
1.1.3 2011-04-28
1.1.2 2011-04-28
1.1.1 2011-04-21
1.1.0 2011-04-20
1.0.5 2011-04-19
1.0.4 2011-04-19
1.0.2 2011-04-12
1.0.1 2011-04-09