In the above example, we have created a div element. Inside this div element we have nested elements. We have rendered a empty button. On click of this button the entire div is selected and its child nodes are removed from DOM structure using empty() method.