Script formatting question
Script formatting question
farawaypress
Posts: 9Questions: 4Answers: 0
This should, I hope, be a very simple question, but it has eluded my meager understanding of Java.
I'm trying to toggle childRowImmediate in specific tables, but while I see the instruction is to write it as...
$('#myTable').DataTable( {
responsive: {
details: {
display: $.fn.dataTable.Responsive.display.childRowImmediate
}
}
} );
...I need to incorporate it into my existing script which is atop my table:
$(document).ready( function () {
$('#TopPostalComics').DataTable( {
fixedHeader: true, responsive: true, "lengthMenu": [ [25, 50, 100, -1], [25, 50, 100, "All"] ]
});
} );
Whenever I try to merge these, things go wrong. How should a block merging these commands look?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Many times its because people forget to add a comma to separate the options. Try this:
Kevin
Thanks! Sadly, it didn't appear to work. I now have...
The responsive command is execited, but the child rows are still hidden on mobile. (and fixedHeader isn't working now either).
Remove the ‘responsive: true’. Its overwriting the previous responsive option. Thats why it wasn’t t in my example.
Kevin
Ah, that did it. Thank you very much!