Web technologies Questions | jQuery Quiz | Set-2 | Question 11
Which of the below jQuery method is used to find the set of elements that is the closest parent to the specified selector?
(A) getNearest( selector )
(B) getClosest( [selector])
(D) None of the above.
Explanation: The closest() is an inbuilt method in jQuery that returns the first ancestor of the selected element in the DOM tree. This method traverse upwards from the current element in the search for the first ancestor of the element. Document Object Model (DOM) is a World Wide Web Consortium standard. It takes parameters as selectors.
Quiz of this Question
Please comment below if you find anything wrong in the above post