Write a jQuery statement to remove all <p> elements with class='prog'?

74. Write a jQuery statement to remove all <p> elements with class="prog"?

  1. $(".prog").remove();
  2. $("p").empty(".prog");
  3. $("p").remove(".prog");
  4. $("p.prog").remove();

Answer: C) $("p").remove(".prog");

Explanation:

The jQuery statement to removes all <p> elements with class="prog" is:

$("p").remove(".prog");

Comments and Discussions!

Load comments ↻






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