I have appended a div to my body
$('<div id="container"><img class="large" src="'+ img +'" /><a href="#">previous</a> | <a href="#" class="next">next</a></div>').appendTo('body').hide().fadeIn();
But i cannot interact with the elements that i;ve added if i try something like
$('a.next').click(function(){
$(this).remove();
});
it doesn't work .. how can i make jquery take notice of the appended elements ?