Closed caseybessette closed 12 years ago
In YUI:
Y.one('#foo').remove(); // Removes #foo from its parent.
Y.one('#foo').remove(true); // Removes #foo and purges plugins and events.
Anyone want to contribute the equivalent jQuery code?
jQuery:
$('#foo').remove(); // Removes #foo including events and jQuery data.
$('div').remove('#foo'); // Removes #foo from within DIV element.
Add examples on how to remove elements from DOM?