This feature has been deprecated. Use Element#closest()
instead.
Load unpoly-migrate.js
to polyfill deprecated features.
Returns the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
The element on which to start the search.
The CSS selector to match.
element The matching element.
Returns null
or undefined
if no element matches.