Skip to content
Related Articles
Open in App
Not now

Related Articles

Web technologies Questions | jQuery Quiz | Set-2 | Question 11

Improve Article
Save Article
  • Last Updated : 20 Sep, 2021
Improve Article
Save Article

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])
(C) closest(selector)
(D) None of the above.


Answer: (C)

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

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!