jQuery - check for empty TDs and if all empty hide the parent TR

前端 未结 5 2591
眼角桃花
眼角桃花 2021-02-20 01:57

I\'d like to check for empty TDs (classes a-h only) and if all are empty, then I\'d like to hide the parent TR. The issues I\'m running into are, my empty TDs contain \" \"

5条回答
  •  梦如初夏
    2021-02-20 02:52

    Why not leave out the non-breaking spaces? I'm guessing they are there for styling purposes on empty TDs?

    If so you can use this CSS to solve that issue:

    table
    {
        empty-cells: show;
    }
    

    Corrected CSS.

提交回复
热议问题