How to obtain only visible elements inside an HTML table using jQuery?
问题 I have the following problem: I have a table in which each row has some cells that are visible, and some that aren't. Something like this: <table> <thead> </thead> <tbody> <tr> <td id='cell_a1'>A</td> <td id='cell_b1' style='display:none'>B</td> </tr> <tr> <td id='cell_a2'>C</td> <td id='cell_b2' style='display:none'>D</td> </tr> </tbody> </table>` And I need to retrieve only the table's visible content using the .html() method, like this for the table above: <table> <thead> </thead> <tbody>