PicNet/tablefilter — Issue #35: How Do I autoselect values in first row?
Author: pepebe
Created: 2012-01-02 22:18:23+00:00
State: open

I'm beginning to fall in love with this plugin.

I'm sure this is an easy one, but but I just can't see what I'm doing wrong here.

I habe a table with n sortable columns (all of them select fields) plus 3 columns that are not sortable (one in the front column, two at the end).

For starters, I want to automatically pre-select the first item in select field #1 and filter the table by that value.

$('#filter_1 option:eq(1)').attr('selected','selected').trigger('change');

should do the trick from my point of view. Unfortunately. Unfortunately this changes the select value, but it doesn't trigger the filter.

It would also be interesting to automatically preselect the first value in each of select field. but that's something I can solve as soon as I understand where I'm wrong in the first example.

Regards,

pepebe

BTW: Where can I find a readable version of this plugin. The non-minified one still uses incomprehensible variable names. I would be much easier to fully understand the ins and outs of this plugin.