ColumnFilter Plugin Help
ColumnFilter Plugin Help
Hey again,
I am trying to add the columnFilter plugin and added it to my js file, but I keep getting a syntax error. Any ideas? http://jagst3r15.com/scholarships360/table-of-scholarships/
[code] jQuery(document).ready(function($) {
$('#scholarships').dataTable( {
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"iDisplayLength": 50,
} );
.columnFilter({
aoColumns: [ { type: "select", values: [ 'Gecko', 'Trident', 'KHTML', 'Misc', 'Presto', 'Webkit', 'Tasman'] },
{ type: "text" },
null,
{ type: "number" },
{ type: "select" }
]
});
} );[/code]
I am trying to add the columnFilter plugin and added it to my js file, but I keep getting a syntax error. Any ideas? http://jagst3r15.com/scholarships360/table-of-scholarships/
[code] jQuery(document).ready(function($) {
$('#scholarships').dataTable( {
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"iDisplayLength": 50,
} );
.columnFilter({
aoColumns: [ { type: "select", values: [ 'Gecko', 'Trident', 'KHTML', 'Misc', 'Presto', 'Webkit', 'Tasman'] },
{ type: "text" },
null,
{ type: "number" },
{ type: "select" }
]
});
} );[/code]
This discussion has been closed.
Replies
} );
.columnFilter({
[/code]
Remove the semi-colon. They are two separate commands at the moment.
Allan
$('#scholarships').dataTable( {
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"iDisplayLength": 50,
} )
.columnFilter({ sPlaceHolder: "head:after",
aoColumns: [ { type: "text", },
{ type: "text" },
null,
null,
]
});
jQuery.extend( jQuery.fn.dataTableExt.oSort, {
"formatted-num-pre": function ( a ) {
a = (a==="-") ? 0 : a.replace( /[^\d\-\.]/g, "" );
return parseFloat( a );
},
"formatted-num-asc": function ( a, b ) {
return a - b;
},
"formatted-num-desc": function ( a, b ) {
return b - a;
}
} );
} );[/quote]