$('#list li a').on('click', function(e) {
var user_id = this.parentNode.id.replace('list_', '');
var id = 'id=' + user_id;
e.preventDefault();
$.ajax({
type: "POST",
url: "xxx.php",
data: id,
success: function() {
$(this).parent().hide(); //the problem is here
$('.updateNumber').html(function() {
return parseInt($(this).text(), 10) + 1;
});
}
});
});
我认为AJAX后调用它,因为(这一点)选择的,它不是正确引用它不能reconize李名单,感谢您的帮助为什么这个jQuery代码不会删除李列表项?