JAVASCRIPT
CSS selector engine
All samples are using Ink.requireModules
, please read how to use it at Ink.requireModules section
Function name | Description |
---|---|
.matches(selector, matches) | Filters elements that match a CSS selector. |
.matchesSelector(element, selector) | Checks if an element matches a given selector |
.select(selector, [context], [results]) | Alias for the Sizzle selector engine |
Filters elements that match a CSS selector.
selector
CSS selector to search for elementsmatches
Elements to be 'matched' withCode
Checks if an element matches a given selector
element
Element to testselector
CSS selector to test the element withCode
Alias for the Sizzle selector engine
selector
CSS selector to search for elementscontext
By default the search is done in the document element. However, you can specify an element as search contextresults
By default this is considered an empty array. But if you want to merge it with other searches you did, pass their result array through here.Code