Home »
MCQs »
jQuery MCQs
Let suppose there are multiple <h3> elements in an HTML document, which is the correct jQuery statement to get the first <h3> element?
99. Let suppose there are multiple <h3> elements in an HTML document, which is the correct jQuery statement to get the first <h3> element?
- $("h3").first();
- $("h3").parent();
- $("h3").firstParent();
- $("h3").top();
Answer: A) $("h3").first();
Explanation:
The correct jQuery statement to get the first <h3> element is:
$("h3").first();