Using Jquery, after a completed ajax call, how can I say remove()
this element you just clicked? Using the following code doesn't work:
$( ".deletegid" ).click(function() {
var imageid = $(this).attr('name');
$.ajax({
type: "POST",
url: "/public/index.php/admin/content/athletes/deleteimagefromgallery",
data: {
imageid: imageid,
galleryid: $("input[name=athletes_gid]").val(),
ci_csrf_token: $("input[name=ci_csrf_token]").val()
}
})
.done(function() {
$(this).remove();
});
});