I have some jQuery code like this:
$("#add").click(function(event){
$("#list").append('<a class="remove" href="#">x</a>');
return false;
});
$('.remove').live('click', function(){
alert("123");
});
If one clicked on class=remove I would like it to alert 123. This doesn't happen though. I think this is a simple idea but I must be missing something.
Any ideas?
Thanks.