Hi All,
In general whenever a partialview is reloaded via ajax success the external js is not working
$.ajax({
url: "@Url.Action("PartialTabelaEcp", "Home")",
type: "POST",
dataType: "html",
data: {"userDate": JSON.stringify(userDate)},
cache: false,
success: function (data) {
$("#kartaEcp").remove();
$("#kartaEcp").html(data);
}
});
js is called in _layout page
used the script in main view - doesnt work
used delegate as well - doesnt work
$("table tbody").on("click", "td > span", function () {});
$("#kartaEcp").remove();
$("#kartaEcp").html(data);
Since we are removing the entire partial html i think the javascrpt is also deleted is there a way to refresh the partial view without loding the script.