asp.net mvc jquery datatable reinitialization after delete
asp.net mvc jquery datatable reinitialization after delete
Can someone tell me how to reinitialize the jquery datatable after delete operation
$("#yes").live('click', function () {
$("#lgnBx").remove();
var contname = $("#contid").attr("value");
var conturl = $("#conturl").attr("value");
var conthref = $("#conthref").attr("value");
var myurl = conturl + contname;
$.ajax({
url: myurl,
type: "POST",
data: { id: contname },
success: function (mydata) {
$("#msgdiv").empty();
$("#msgdiv").append(mydata);
$('#row-' + contname).fadeOut('slow');
},
errors: function(mydataerr){
$("#msgdiv").empty();
$("#msgdiv").append(mydataerr);
}
});
$("#lgnBack").remove();
});
});
$("#yes").live('click', function () {
$("#lgnBx").remove();
var contname = $("#contid").attr("value");
var conturl = $("#conturl").attr("value");
var conthref = $("#conthref").attr("value");
var myurl = conturl + contname;
$.ajax({
url: myurl,
type: "POST",
data: { id: contname },
success: function (mydata) {
$("#msgdiv").empty();
$("#msgdiv").append(mydata);
$('#row-' + contname).fadeOut('slow');
},
errors: function(mydataerr){
$("#msgdiv").empty();
$("#msgdiv").append(mydataerr);
}
});
$("#lgnBack").remove();
});
});
This discussion has been closed.