Uncaught TypeError: $(...).dataTable is not a function
Uncaught TypeError: $(...).dataTable is not a function
Hello, how you can see in the tittle, i have an a Uncaught TypeError: $(...).dataTable is not a function..
I'm trygin to use Jeditable on my DataTable.
This is my code:
$( document ).ready(function() {
var tabla = $('#example').dataTable("ajax": "data.json",
"columns": [
{"data": "NIF/NIE"},
{"data": "1er Apellido"},
{"data": "2do Apellido"},
{"data": "Nombre"},
{"data": "Sexo"},
{"data": "Fecha Nacimiento"},
{"data": "Fecha Contrato"},
{"data": "Demandante empleo larga duracion"},
{"data": "Tipo Contrato"},
{"data": "% Jornada"},
{"data": "Discap"},
{"data": "Causas Archivo"},
{"data": "Aut SCSP"},
{"data": "Imp Solic"},
{"data": "Sust"}
]
).makeEditable();
});
These are my libraries:
src="resources/js/jquery.js" type="text/javascript"
src="resources/js/jquery.dataTables.js" type="text/javascript"
src="resources/js/jquery.jeditable.js" type="text/javascript"
src="resources/js/jquery-ui.js" type="text/javascript"
src="resources/js/jquery.validate.js" type="text/javascript"
src="resources/js/jquery.dataTables.editable.js" type="text/javascript"
I think my error is on the libraries, because when i don't use the jeditable library there is no error,( the error would be in this case: makeEditable is not a function, but i could see the DataTable ) but if i want to use .makeEditable() i have to implement that...
Any ideas?
Thanks!
Answers
This will normally happen if you include jQuery twice on a page. Are you including it else where?
Allan
Hello again, i resolve this problem changing one library, but now i have another problem...
The Datatable is not showing the td...
This is my HTML table:
<body id="dt_example">
</body>
The Datatable show the JSON datas, but not the HTML table... any ideas?
Thanks Allan.
Gea.
I resolved it changing td for th and adding a <thead></thead> tag.
Thanks :)