Home »
MCQs »
jQuery MCQs
There is a <pre> element, write a jQuery statement to get it's parent?
91. There is a <pre> element, write a jQuery statement to get it's parent?
- $("pre").parent();
- $("pre").parents();
- $("pre").parentsUntil();
- None of the above
Answer: A) $("pre").parent();
Explanation:
The correct jQuery statement to get the direct parent of a <pre> tag is:
$("pre").parent();