开发者

Hiding HTML Table rows when using Sorttable

开发者 https://www.devze.com 2022-12-22 02:12 出处:网络
I have a large table (4000 rows, 17 columns) with which I use Sorttable. It\'s somewhat usable in Chrome (not so much in IE). I\'d like to add some checkboxes (not on each row, just in a control panel

I have a large table (4000 rows, 17 columns) with which I use Sorttable. It's somewhat usable in Chrome (not so much in IE). I'd like to add some checkboxes (not on each row, just in a control panel besides the table) to show/hide groups of rows, using Javascript. I'm not (so far) using JQuery or anything other than Sorttable (which works great, by the way).

What's the best way to hide those rows? I think I need to do more than just set display: none; on the rows I want to hide, as I think this means the row would still get sorted by Sorttable. I suppose I want to remove the row from the table altogether, an开发者_Python百科d keep them in some list outside the DOM? Would anybody happen to have some existing/sample code that does that?


One possibility is to save all data in JSON and then write it to an table. By this you can remove the item from the table, sort the table and add the item again if you'd like.

Don't have an example right now but check it out.

Could probebly save the table with http://api.jquery.com/jQuery.data/

Hope it's some help

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号