Responsive example `new` constructor

Responsive will automatically detect new DataTable instances being created on a page and initialise itself if it find the responsiveR option or responsive class name on the table, as shown in the other examples.

The third way of initialising Responsive is manually creating a new instance using the $.fn.dataTable.Responsive class, as shown in this example (the other two methods are provided using this constructor in a initDT event handler!).

The Javascript shown below is used to initialise the table shown in this example:

1
2
3
4
5
$(document).ready(function() {
    var table = $('#example').DataTable();
 
    new $.fn.dataTable.Responsive( table );
} );

In addition to the above code, the following Javascript library files are loaded for use in this example: