Home »
MCQs »
jQuery MCQs
Which is the correct jQuery selector to select all <div> elements with class name 'new'?
19. Which is the correct jQuery selector to select all <div> elements with class name "new"?
- $(".new")
- $("div.new")
- $(".div.new")
- $(".div#new")
Answer: B) $("div.new")
Explanation:
The $("div.new") selector is used to select all <div> elements with class name "new".