Sortable list, remove element with effect

Sortable list, remove element with effect

Hi everyone,

i have a sortable list and i want to remove an li-element. But before that there should be a fade effect, and that is the problem.

  1. function deleteVote(id) {
       
        jQuery.ajax({
            type: "POST",
            url: "?page=ServerControl&id=123",
            data: "deleteVote=" + id,
            success: function(req){
                    if (req == "1") {
                        jQuery("#votelist > li").each(function(n,item){
                            if (item.id==id) {
                                //jQuery(item).effect("fade", {}, 500, function(){
                                //    jQuery(item).remove();
                                //});
                                jQuery(item).hide(500, function(){
                                    jQuery(item).remove();
                                });
                            }
                        });
                    }
                }
        });
       
    }






















This is the version that works. The 3 lines that are comment out don't work.
The id parameter of the li-tag that should fade is in the variable id.

When i try it on this site it works:
http://jsfiddle.net/SpL52/