Home »
MCQs »
jQuery MCQs
Which is the correct jQuery selector to select the first list item of <ul> element?
22. Which is the correct jQuery selector to select the first list item of <ul> element?
- $("ul li:first")
- $("ul:first")
- $("li:first")
- $("ul.li:first")
Answer: A) $("ul li:first")
Explanation:
The $("ul li:first") selector is used to select the first list item of <ul> element.