The jQuery function (usually aliased as $) can be used both to select elements and to create new elements.
var myLink = $('<a href="http://stackexchange.com"></a>');
You can optionally pass a second argument with element attributes:
var myLink = $('<a>', { 'href': 'h...