Merging JavaScript commands

Merging JavaScript commands

conciseconcise 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

Answers

This discussion has been closed.