$('button[type="button"]').click(function() { var id_usera = $(this).attr('value'); var url = "delete.php?zrodlo=user&id=" + id_usera; if(confirm("Czy na pewno chcesz usunąć tego użytkownika?")){ $.get(url); $(this).closest('tr').animate({'backgroundColor':'#EF3E23','color':'#fff'},300,function(){ $(this).remove(); }); } });