Hide initially all table rows before the visitor uses a column filter

In case you want to hide all the table rows before the visitor selects a column filter, you can use the code presented in this tutorial. Note that this will affect all tables, so if you want to apply this to a specific table use the table id in the jQuery selector.

function customFnDrawCallback(table_id, oTable) {		
    filters = [];
    source_datatable_id = 0;		
    jQuery('#'+table_id+' select[name^="tab_search_col_"]').each(function () {
        var filter_value = this.value;
        var filter_name = this.name;       
        var patt = /tab_search_col_(\d+)_(\d+)/;           					
        var res = patt.exec(filter_name);
        if (res && (filter_value!='')) {           
            source_datatable_id = parseInt(res[1]);
            var column_index = parseInt(res[2]);                   
            filters.push({value: filter_value, column_index: column_index, control_type: "select"});
    if (filters.length>0) {
		jQuery('#'+table_id+' tbody').show();		
    } else {		
		jQuery('#'+table_id+' tbody').hide();