jQuery - empty()

The remove() removes the child element's (content) from the selected element.

This will stay...

When you empty the demo1 div, it will remain in the DOM but be empty. Inspect this element after running the test.

 


$("#EmptyButton").click(function ()
{
    $("#demo1").empty();
});