How to call jquery for datatable after page load ??
How to call jquery for datatable after page load ??
corus123
Posts: 3Questions: 1Answers: 0
Hello Sir , I have using bootstrap in my website . I have using jquery version 1.9.4 for datatables. It works Correctly when page run and data is loaded . I want to use jquery after button click and data load in tables. Waiting for your reply . Thanks in advance
This discussion has been closed.
Answers
$('#table').dataTable({
"ajax": test.php'
});
$("button").click(function(event) {
event.preventDefault();
$.post(
"test.php",
{name: "John",
time: "2pm"})
.done(function(data) {
$('#table').DataTable().ajax.reload();
});
});
When page is postback to the server and table is put in update panel the jquery not load again .
I am using Asp.net
@chico3001's answer is the one I would give as well. You need a callback to execute the code that @chico3001 suggests (or a modification of it for your specific use case).
Allan