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

  1. $("notif").empty();
  2. $("#notif").empty();
  3. $(".notif").empty();
  4. $("<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();

Comments and Discussions!

Load comments ↻






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