class method Prototype.Selector.find

View source on GitHub →

Prototype.Selector.find(elements, expression[, index = 0]) → Element
  • elements (Enumerable) – a collection of DOM elements.
  • expression (String) – A CSS selector.
  • index (Number) – Numeric index of the match to return, defaults to 0.

Filters the given collection of elements with expression and returns the first matching element (or the indexth matching element if index is specified).