看来我无法在jquery ajax成功函数中访问$(this).请看下面的代码.
$.ajax({
type: 'post',
url: '<?php echo site_url('user/accept_deny_friendship_request')?>',
data: 'action='+$action+'&user_id='+$user_id,
success: function(response){
//cannot access $(this) here $(this).parent().remove();
}
});
Run Code Online (Sandbox Code Playgroud)