Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

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

  • Last Updated : 20 Sep, 2021

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
Recommended Articles
Page :

Start Your Coding Journey Now!