closest method

ElementQuery closest (
  1. String selector
)

Retrieve the closest ancestor (including itself) of each element in this

  • collection respectively who matches the given selector.

Implementation

ElementQuery closest(String selector);