Because when you inject new content to the DOM (via ajax or javascript), The existing binding wont work .You have to either rebind the events or use jQuery on
which will work for current elements and future elements
http://api.jquery.com/on/
So to fx this, change
$('.test').click(function(){
alert("I've been clicked!")
});
to
$(document).on('click','.test',function(){
alert("I've been clicked!")
});