I'm currently working on a project using Laravel platform. I'm trying to delete data from a model asynchronously using ajax. And when all is done my data should be removed from the table. My code runs perfectly, data are being removed from my database , yet "tr" elements arent really faded or removed. Here is my code : ajax sucess not really working.
$(document).on('click', '.btn-remove-interview' , function() {
var id = $(this).attr('data-interview-id');
$.ajax({
url: './manage/interviews/destroy/'+id ,
type: 'post',
dataType: 'json',
data: id,
success: function (data){
$(this).parents("tr").remove();
}
});
});
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2acPsZI
via IFTTT
Aucun commentaire:
Enregistrer un commentaire