Kevin 08b0754135 grid programme | пре 4 година | |
---|---|---|
.. | ||
.npmignore | пре 4 година | |
README.md | пре 4 година | |
bower.json | пре 4 година | |
matches-selector.js | пре 4 година | |
package.json | пре 4 година | |
tests.html | пре 4 година | |
tests.js | пре 4 година |
matches
/matchesSelector
is pretty hot :fire:, but has vendor-prefix baggage :handbag: :pouch:. This helper function takes care of that, without polyfilling or augmenting Element.prototype
.
matchesSelector( elem, selector );
// for example
matchesSelector( myElem, 'div.my-hawt-selector' );
Download matches-selector.js
Install with Bower: bower install matches-selector
Install with npm: npm install desandro-matches-selector
IE10+, all modern browsers
Use matchesSelector v1 for IE8 and IE9 support.
matchesSelector is released under the MIT license