datatable after loading function
Spinner Example $(document).ready(function() { var table = $('#table_id').DataTable({ "language": { "processing": '' } }); });
Here is what the above code is Doing:
1. We are using the jQuery library to select the table with the id “table_id” and then we are initializing the DataTable() method on it.
2. We are using the language option to set the processing text to a spinner.
3. We are using the font-awesome library to display the spinner.
Now, let’s see how to display a spinner while the table is loading.