Append and Prepend in jQuery — a practical guide to jQuery append prepend with clear examples you can reuse in real projects.
jQuery Tutorial Series (42/101). Prefer one article? Read the complete jQuery tutorial.
Short description
appendTo/prependTo reverse the caller/target relationship.
append prepend
$('#list').append('<li>End</li>');
$('#list').prepend('<li>Start</li>');
$('<li>End</li>').appendTo('#list');