I have the following jQuery code which works, but it made me ponder if it were possible to do an append action on what was being appended without the need of specifying what
I'd use the appendto and then append http://jsfiddle.net/Y8TwW/2/
var container = $('#container'),
child = 'child';
$('', { 'id': child }
).appendTo(container
).append($('', {
'class' : 'close',
'href' : 'javascript:;',
html : 'close',
click : function(e){
e.preventDefault();
$('#' + child).remove();
}
}));