Which jQuery method is used to get the all ancestor elements of the selected element, all the way up to the document's root element (<html>)?

89. Which jQuery method is used to get the all ancestor elements of the selected element, all the way up to the document's root element (<html>)?

  1. parent()
  2. parents()
  3. parentsUntil()
  4. All of the above

Answer: B) parents()

Explanation:

jQuery method parents() is used to get the all ancestor elements of the selected element, all the way up to the document's root element (<html>).

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.