How do I hide the middle of a table using jQuery?

前端 未结 6 891
时光取名叫无心
时光取名叫无心 2020-12-23 12:28

I have a really long 3 column table. I would like to


    <         
6条回答
Column1Column2
... ... ...
Col1 Col2 Col3
data1 data1 data1
Show hidden rows
data1 data1 data1

It's not a great method, because it doesn't degrade nicely.

To get it to degrade nicely, you'd have to have all the rows shown initially, and then hide them with your jQuery document ready function, and also create the row with the link in.

Also, your method of giving the rows to hide a particular class should also work. The jQuery would look something like this:

$(document).ready(function() {
    $('tr.Table_Middle').hide();
});

You'd still need to create the row with the link to unhide them though.

提交回复
热议问题