I'm trying to add a loaded gif in my datatable
. I tried but it does not work.
Here my code
<script>
// Call the dataTables jQuery plugin
$(document).ready(function() {
var table = $('#dataTable').DataTable({
"destroy": true,
"ajax": {
"method": "POST",
"url": "include/personalJSON.php"
},
"order": [
[0, "desc"]
],
"columns": [{
"data": "Codigo"
}, {
"data": "Nombre"
}, {
"data": "Rut"
}, {
"data": "FechaIngreso"
}, {
"data": "DescArea"
}, {
"data": "Cargo"
}, {
"data": "Correo"
}, {
"data": null,
"defaultContent": " <button type='button' title='Cambiar contraseña' class='change btn btn-warning' data-toggle='modal' data-target='#myModalthree' ><i class='fa fa-key' aria-hidden='true'></i> </i></button>"
}],
"language": idioma_espanol,
"processing": "<img style='width:50px; height:50px;' src='asset/images/Gear-1s-200px.gif'/>"
});
});
var idioma_espanol = {
"sProcessing": "Procesando...",
"sLengthMenu": "Mostrar _MENU_ registros",
"sZeroRecords": "No se encontraron resultados",
"sEmptyTable": "Ningún dato disponible en esta tabla",
"sInfo": "Mostrando registros del _START_ al _END_ de un total de _TOTAL_ registros",
"sInfoEmpty": "Mostrando registros del 0 al 0 de un total de 0 registros",
"sInfoFiltered": "(filtrado de un total de _MAX_ registros)",
"sInfoPostFix": "",
"sSearch": "Buscar:",
"sUrl": "",
"sInfoThousands": ",",
"sLoadingRecords": "Cargando...",
"oPaginate": {
"sFirst": "Primero",
"sLast": "Último",
"sNext": "Siguiente",
"sPrevious": "Anterior"
},
"oAria": {
"sSortAscending": ": Activar para ordenar la columna de manera ascendente",
"sSortDescending": ": Activar para ordenar la columna de manera descendente"
}
}
</script>
HTML
<table class="table table-striped" id="dataTable" width="100%" cellspacing="0">
<thead>
<tr>
<th>Codigo</th>
<th>Nombre</th>
<th>Rut</th>
<th>F.Ingreso</th>
<th>Area</th>
<th>Centro Costo</th>
<th>Cargo</th>
<th>Correo</th>
<th></th>
</tr>
</thead>
<tbody>
</tbody>