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"?

  1. $(".new")
  2. $("div.new")
  3. $(".div.new")
  4. $(".div#new")

Answer: B) $("div.new")

Explanation:

The $("div.new") selector is used to select all <div> elements with class name "new".

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.