I have few line that listing to this script
$("a.remove").click(function(){
    var id = $(this).attr('id')
    var user = $(this).attr('value')
    $.ajax({
        success : function(){
            var url = "includes/action.php?page=access&action=remove";
            var popupmessage = "Error";
            $.post(url, { id: id },
                function(data){
                    return true;
            });
        }
    });
});
but when i add new line via jQuery it doesn't work until refreshing the page
$("<a class=\"remove\" href=\"#\"></a>").insertAfter('#accesstable tr:last');
any idea how to fix it ?
Edit: Working code
$('a.remove').live('click', function(){
    var id = $(this).attr('id')
    var user = $(this).attr('value')
    $.ajax({
        success : function(){
            var url = "includes/action.php?page=access&action=remove";
            var popupmessage = "Error";
            $.post(url, { id: id },
                function(data){
                    return true;
            });
        }
    });
});
 
     
     
     
     
     
    