Merging JavaScript commands
Merging JavaScript commands
concise
Posts: 13Questions: 5Answers: 0
This is my current JavaScript:
<script>
$(function () {
$("#speakers").DataTable({
"order": [[0, "desc"]]
});
$("#cfp").DataTable({
"order": [[0, "desc"]]
});
});
</script>
What I'd like is for both of these tables to display 100 records. I understand for this to work I need pageLength, so, like this:
$('#speakers').dataTable( {
"pageLength": 100
} );
I've tried merging these together but they don't work well - any idea how to make them work together? Thanks
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi,
The documentation shows how you can set multiple options for a single table. The
pageLength
option is the correct one to use to set the page length.Allan
thanks that solved it