Hiding a table column if the containing cells are empty with jQuery

前端 未结 3 677
别跟我提以往
别跟我提以往 2021-01-01 01:31

I have a table of the following kind:



        
      
      
      
3条回答
  •  甜味超标
    2021-01-01 02:13

    I would recommend adding a class to each th and td (something like "col_1", "col_2" etc) and using $("td").children("span:empty") to find the columns that should be hidden.

提交回复
热议问题