submitted by: Snippissimo

Javascript: jQuery remove element

This example shows how to remove or delete an element such as a div or form field. Element is identified by its ID.


code snippet:
$('#myelement').remove();

sample output:
Will remove the element which has the id 'myelement', regardless of whether it is a <div>, <span>, etc..