When working with DataTables over multiple pages it is often useful to set the initialisation defaults to common values (for example you might want to set dom
to a common value so all tables get the same layout). This can be done using the $.fn.dataTable.defaults
object. This object will take all of the same parameters as the DataTables initialisation object, but in this case you are setting the default for all future initialisations of DataTables.
$.extend( true, $.fn.dataTable.defaults, { "searching": false, "ordering": false } ); $(document).ready(function() { $('#example').DataTable(); } );