jquery tablesorter filter plugin

I am using the [tablesorter][1] jquery plugin paired with this great [tablesorter filter][2] plugin. I have a select box on my page that contains a list of all the columns of my table. I want to be able to limit the filter to only the selected column when the user chooses to select it. So far I have attached an event to the select box like so: $('#SelectedColumn').bind("change", columnSelected); With a handler like so: function columnSelected() { var selected = $(this).val(); $.tablesorterFilter.defaults.filterColumns = [selected]; } This does correctly set the default value for the filter column but when the filter happens it doesn't actually use that value. It appears the plugin allows you to set filtered columns only on construction. Or my jquery newbiness cant figure out how to get at the bit of data I need to flip. [1]: http://tablesorter.com/docs/ [2]: http://github.com/jbritten/jquery-tablesorter-filter/tree/master
Same problem. I desperately wish there was a concise example including all HTML, JS and references... this is a nightmare.

以上就是jquery tablesorter filter plugin的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » jQuery 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏