Can I set a default search with the PicNet Table Filter?
I've created a table that's using the PicNet Table Filter, and I would like to add a default search to one of the fields; the column is "Hrs Ago", and I want the default to be "<开发者_运维知识库30". Is this possible? Google and the docs got me nowhere.
Sorry there is no support for default values baked in to the table filter as yet. However you could use jQuery to do this for you. Simply:
$('#filter_1').val('<30').trigger('keyup')
Tnx
Guido
$('#filter_1').val('<30').trigger('keyup')
does not seem to work for me.
Instead of it I've found a method that does work:
$('#filter_1').val('<30')
.parents('table:first')
.tableFilterRefresh()
I had to use
$('#filter_1').val('<30').keyup(); //For textfield filters
$('#filter_1').val('Option_1').change(); //For dropdown select filters
精彩评论