youngseagul
youngseagul

Reputation: 347

Is it possible to not load data first time on page load?

I'm using the jquery DataTables plugin.

Is it possible to not load data first time?

I will load data later with different filters applied.

Upvotes: 1

Views: 6615

Answers (1)

mainguy
mainguy

Reputation: 8331

You could use the deferLoading Parameter and set it to 0. This will delay the loading of data until a filter or sorting action happens.

$(document).ready(function() {
    $('#example').dataTable( {
        "processing": true,
        "serverSide": true,
        "deferLoading": 0,
        "ajax": {
                url:"scripts/server_processing.php",
                'data': {
                        'dbName': 'willi'
                }
        }
    });
});

More Info here (dataTables 1.10.0)

Upvotes: 11

Related Questions