I have a table in a html page that I post in another html with jquery load();
When charged dynamically the sun does not recognize it and I can not load the table.
$(function() {
$('#contenedor-home').load('Views/Vista1.php');//Vista1 contiene la tabla
tabla = $('#example').DataTable( {
"language": {
"url": "js/lib/spanis-datatables.json"
},
"ajax": {
"url": "Services/getAllUsuarios.php",
"dataSrc": ""
},
"columns": [
{ "data": "id" },
{ "data": "nombre" },
{ "data": "password" },
{ "data":"id",
"render": function(data){
return '<a class="delete" onclick="eliminarUsuario('+data+')"><i class="fa fa-fw fa-trash-o btn-lg"></i></a><a class="edit" onclick="editarUsuario('+data+')"><i class="fa fa-fw fa-pencil btn-lg"></i></a>';
}}
]
} );
}