I want to make friend request system. When I click the "Add friend" button, this button hide and sent button show.
$(document).ready(function() {
$(".add-button").click(function(){
$.post("friend-list.php", function(data, status){
$(this).hide();
$(this).next().show();
});
});
});
Some screenshot
(this) selector does not have any effect. How can I do this?