add code in script
add code in script
Alex2019
Posts: 62Questions: 9Answers: 0
Hello,
how to add and where this in the script,
I get an error if I enter it,
order": [[ 1, "asc" ]]
thank you
<script>
$(document).ready( function () {
var table = $('#personal').DataTable({
"createdRow": function( row, data, dataIndex ) {
if ( data[5] == "Dvd" ) {
$(row).addClass('grey');
}
if ( data[5] == "Vhs" ) {
$(row).addClass('yellow');
}
}
});
} );
</script>
This discussion has been closed.
Replies
Anywhere in the Datatables init, like this:
Note the comma at the end of the line to separate options.
Kevin
mystery solved, sorry I'm new for Datatables,
thank you kthorngren
This not work
"language": {"localhost/Movie/": "italian.lang"},
italian.lang is located localhost in the Movie folder
I think you are looking for the
language.url
option. The examples should help.Kevin
strange, not work
link localhost