Web technologies Questions | jQuery Quiz | Set-3 | Question 15
Which of the below jQuery method is used to find all the ancestor elements between two given elements in a DOM tree?
(D) $(selector).slice(para1, para2)
Explanation: The paentsUtil() is an inbuilt method in jQuery it is used to find all the ancestors of the element between the two Document object model tree. it is www Consortium standard., It means that it defines the element in the Dom tree. It takes parameter “selector2” which is the last marked parent of the tree The return type of parentsUtil() is it returns the ancestor element between the two given elements.
Quiz of this Question
Please comment below if you find anything wrong in the above post