Add and Remove Elements in jQuery — a practical guide to jQuery add remove elements with clear examples you can reuse in real projects.
jQuery Tutorial Series (41/101). Prefer one article? Read the complete jQuery tutorial.
Short description
$(htmlString) creates nodes; append them to a parent.
Create & remove
var $li = $('<li/>', { text: 'New item', class: 'item' });
$('#list').append($li);
$li.remove();