Can I make the ID of Edit / Delete button in defaultContent?
Can I make the ID of Edit / Delete button in defaultContent?
I am a newbie in DataTables. Someone help me, please....
I want to make Edit and Delete button in defaultContent that using AJAX process.
But the problems is the ID of Edit and Delete button in defaultContent didn't called by using ".click(function { })".
This my javascript.
$(document).ready(function() {
$('#hospital').DataTable( {
processing: true,
serverSide: true,
ajax: "server_processing.php",
columns: [
{ data: "name" },
{ data: "location" },
{ data: "class" },
{
data: null,
className: "center",
defaultContent: "<button id='edit'>EDIT</button> / <button id='delete'>DELETE</button>"
}
]
});
$("#edit").click(function(){
...
$.ajax({
...
});
});
$("#delete").click(function(){
...
$.ajax({
...
});
});
Help me please....