var el = $("<div>lol</div>");

el.click(function() {
   alert("hi"); 
});

$("body").empty().append(el);
$("body").empty().append(el);