Home »
MCQs »
jQuery MCQs
Write a jQuery statement to remove all child elements only from the element having id 'notif'?
73. Write a jQuery statement to remove all child elements only from the element having id "notif"?
- $("notif").empty();
- $("#notif").empty();
- $(".notif").empty();
- $("<notif>").empty();
Answer: B) $("#notif").empty();
Explanation:
The jQuery statement to remove all child elements only from the element having id "notif" is:
$("#notif").empty();