I have this code to dynamic delete files from my list:
$(".removeThisFile").click(function () {
var id = $(this).attr("id");
$('.file-id-' + id).hide();
$.ajax({
url: '',
type: 'get',
dataType: 'json',
_token: $('meta[name="_token"]').attr('content'),
headers: {
'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content')
},
cache: false,
success: function (response) {
$(this).hide();
}
});
});
This code delete only one file (after first click). When I secondary click on this link - the file is not deleted.
How repair it?
from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2HxTFsy
via IFTTT
Aucun commentaire:
Enregistrer un commentaire