diff --git a/templates/chat/chat.html b/templates/chat/chat.html index b839939..122ab2c 100644 --- a/templates/chat/chat.html +++ b/templates/chat/chat.html @@ -135,9 +135,11 @@ data: elt.data(), dataType: 'json', success: function(data){ - console.log('delete ajax call success!'); - location.reload(); - } + elt.closest('li').hide(); + }, + fail: function(data) { + alert('Fail to delete'); + }, }); }); {% endif %}