1

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?

soniya soniya
  • 297
  • 2
  • 3
  • 14
  • possible duplicate of [jQuery "Please Wait, Loading..." animation?](http://stackoverflow.com/questions/1964839/jquery-please-wait-loading-animation) – Vladimir Ramik Mar 12 '15 at 06:14

3 Answers3

0

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/ )

Mego
  • 154
  • 1
  • 3
  • 10
0

If you want to replace "loading......" string with an image

$('#example').dataTable( {
        "oLanguage": {
            "sProcessing": "<img src='loading.gif'>"
        }
    } );
0

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">
soniya soniya
  • 297
  • 2
  • 3
  • 14