[jQuery] add a link after page load?

[jQuery] add a link after page load?


Hi all,
I am trying to add links to a div when another div is clicked.
The links get added fine, but they do not work when clicked. However i
am also saving the value to a cookie & display them on page refresh,
at this stage they do work as expected.
Any ideas on how I can get the links to work just after they are added
to the div without a page refresh. Code used below.
$('.closeleft').click(function() {
var $this = $(this);
var boxName = $this.parents(".leftBoxContainer").attr("id");
$(this).parents(".leftBoxContainer").hide();

$.cookieJar('leftBoxClosed').set($this.parents(".leftBoxContainer").attr("id"),
'hidden');
$('#hiddencontent').show();
$('#hiddenleft').add('<a href="#" class="'+boxName+'">'+boxName+'</
a>');
return false;
});