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

75. Write a jQuery statement to remove all <pre> elements with class="prog" and class="old"?

  1. $(".prog#old").remove();
  2. $("pre").empty(".prog",".old");
  3. $("pre").remove(".prog, .old");
  4. $("pre.prog.old").remove();

Answer: C) $("pre").remove(".prog, .old");

Explanation:

The jQuery statement to remove all <pre> elements with class="prog" and class="old" is:

$("pre").remove(".prog, .old");

Comments and Discussions!

Load comments ↻






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