Jquery: Delete After Adding to Database

I have a jquery code that adds data to the database without having the reload which works great. The problem is I want to delete information after I add it. The jquery will let me delete if I refresh the page, but not if I try to delete after I have added to the database. I have tested it to see if there is an id getting through after I add to the database and it is. So I don’t see what the problem is.

Well here is my code for deleting:

$(function() {
$(".delete_button").click(function() {
var id = $(this).attr("id");
var dataString = 'id='+ id ;
var parent = $(this).parent();

$.ajax({
type: "POST",
url: "delete_element.php",
data: dataString,
cache: false,

success: function()
{
if(id % 2)
{
parent.fadeOut('slow', function() {$(this).remove();});
}
else
{
parent.slideUp('slow', function() {$(this).remove();});
}
}
});

return false;
});
});