I need to display the data table with a loading symbol.
I have more than 10,000 records. I need to display this records in data table. This is the code to display the record in data table ,
$('#example').dataTable({
"oLanguage": {
"sProcessing": "loading......"
}
});
I have more than 10,000 records so that the data table displays a few seconds late. As a result I need to display the loading symbol. How can I achieve this?
You must use Ajax (here is the example: http://www.w3schools.com/ajax/tryit.asp?filename=tryajax_suggest_php )
The loading symbol you can get by jQuery Lazy ( http://plugins.jquery.com/lazy/ )
If you want to replace "loading......" string with an image
$('#example').dataTable( {
"oLanguage": {
"sProcessing": "<img src='loading.gif'>"
}
} );
Please try this.
In Jquery :-
$(document).ready(function() {
$('#example').dataTable({
});
$('#example').show();
});
In Html :-
<table id="example" class="display" cellspacing="0" width="100%" style="display:none">