joequery/Stupid-Table-Plugin

default sorting

yairEO opened this issue · 1 comments

I would like to use the data-sort-default attribute on a th element to indicate to the script that this column should be sorted by initially when the script it executed on a table element, so the table will immediately be sorted.

I've added this line:

$(this.tHead).find('[data-sort-default]').click();

at the end of this function $.fn.stupidtable = function(sortFns) { ...