Skip to content

Commit cbdc268

Browse files
authored
Update article.md
1 parent 13da056 commit cbdc268

File tree

1 file changed

+1
-1
lines changed
  • 2-ui/1-document/04-searching-elements-dom

1 file changed

+1
-1
lines changed

2-ui/1-document/04-searching-elements-dom/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ For instance:
142142

143143
*Ancestors* of an element are: parent, the parent of parent, its parent and so on. The ancestors together form the chain of parents from the element to the top.
144144

145-
The method `elem.closest(css)` looks the nearest ancestor that matches the CSS-selector. The `elem` itself is also included in the search.
145+
The method `elem.closest(css)` looks for the nearest ancestor that matches the CSS-selector. The `elem` itself is also included in the search.
146146

147147
In other words, the method `closest` goes up from the element and checks each of parents. If it matches the selector, then the search stops, and the ancestor is returned.
148148

0 commit comments

Comments
 (0)