[jQuery] Jquery delete row with A click function

[jQuery] Jquery delete row with A click function


Hello,
I'm very new to Jquery and having a problem. I'm trying to delete a
row in my table. You can see if I add my data, I will add a link with
to remove the row. The Goal is to add a function to delete the parent
row. Now the problem is if I click the A in the HTML (setted manual)
it will alert me the message. But when I click the added link in the
row by the function it doesn't do anything. any Help ? here is the
code
<script type="text/javascript">
$('document').ready(function()
{
$('a.delete').click(function()
{
alert('test');
});
$('#track_submit').click(function()
{
$('#tracklistTable').css('display','block');
var tableCode = $('#tracklistTable').html();
var trackTitle = $('#track_title').val();
var trackGenre = $('#track_genre').val();
var trackArtist = $('#track_artist').val();
var trackLength = $('#track_length').val();
$
('#tracklistTable').children('tBody').append('<tr>'+trackArtist
+'<td>'+trackTitle+'</td><td>'+trackGenre+'</td><td>'+trackLength+'</
td><td>Remove Track</td></tr>');
return false;
});
});
</script>
<a class='delete' href='#'>test delete link</a>