Home »
MCQs »
jQuery MCQs
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"?
- $(".prog").remove();
- $("p").empty(".prog");
- $("p").remove(".prog");
- $("p.prog").remove();
Answer: C) $("p").remove(".prog");
Explanation:
The jQuery statement to removes all <p> elements with class="prog" is:
$("p").remove(".prog");