HTML:
<li id="id-1234">
Some text
<a href="#" class="remove_li">Remove</a>
</li>
Javascript:
$(document).ready(){
$('.remove_li').live('click', function(){
var id = $(this).parent().attr('id').substring(3);
var that = this;
$.post('url.php', {id: id}, function(data, status){
if(status == 'success'){
$(that).parent().remove();
} else {
alert("Couldn't delete");
}
});
});
}