For each element in the set, get the first elements that match the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
For each element in the set, get the first elements that match the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
an Elements (which may be empty)
http://api.jquery.com/closest/
Finds the first element that matches the selector by testing the element itself and then its ancestors, but ensuring that the element is located "after" (i.e.
Finds the first element that matches the selector by testing the element itself and then its ancestors, but ensuring that the element is located "after" (i.e. closer to the bottom of the document) than "this" Element.
Finds the first element that matches the selector by testing the element itself and then its ancestors, but ensuring that the element is located "before" (i.e.
Finds the first element that matches the selector by testing the element itself and then its ancestors, but ensuring that the element is located "before" (i.e. closer to the top of the document) than "this" Element.
For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
a Some containing the first one found, or None
http://api.jquery.com/closest/