jQuery post()方法不工作(this)选择器

时间:2017-04-05 14:52:53

标签: jquery ajax post

我想做朋友请求系统。当我点击"添加朋友"按钮,此按钮隐藏和发送按钮显示。

$(document).ready(function() {
  $(".add-button").click(function(){
    $.post("friend-list.php", function(data, status){
      $(this).hide();
      $(this).next().show();
    });
  });
});

一些截图

list of friend list

(这个)选择器没有任何效果。我怎么能这样做?

0 个答案:

没有答案