Problem with simple "order": [[0, 'asc']]
Problem with simple "order": [[0, 'asc']]
Hi All,
I did start today work with datatables plugin in my personal project but the function "order" when load the page don't work, anyone know can be? (if I did click in asc or desc icon the "sort" funcioni is work fine..)
I will copy the code bellow (is copy from example..).
Thanks
my code:
My ideia is sorting the column "0" that the content is number of ID...
<script>
$(document).ready(function(){
$('#minhaTabela').DataTable({
"language": {
"lengthMenu": "Mostrando _MENU_ registros por página",
"zeroRecords": "Nada encontrado",
"info": "Mostrando página _PAGE_ de _PAGES_",
"infoEmpty": "Nenhum registro disponível",
"infoFiltered": "(filtrado de _MAX_ registros no total)",
"order": [[0, 'asc']]
}
});
});
</script>
Edited by Kevin: Syntax highlighting. Details on how to highlight code using markdown can be found in this guide
This question has an accepted answers - jump to answer
Answers
Looks like you have
"order": [[0, 'asc']]
inside thelanguage
option. Move it outside like this:Kevin
Hi Kevin
OMG!
What was I thinking!
Is true, You are right!
perfect!
Thanks Kevin