In my application i am using datatables.net
var ticketHistoryDataTable = $(\'#ticketHistoryData\').DataTable({ paging: false, data: [],
You can use dom option to show loading:
dom
$('#example').dataTable( { "dom": 'lrtip' } );
"r" letter is related to show loading element. For more information refer to this link