html - Hide an entire row of table where a cell is empty -


How can I hide the entire row if one cell in the second column is blank?

  & lt; Table class = "maintenance" & gt; & Lt; TR & gt; & Lt; Td square = "tb_1c" & gt; Brand: & lt; / Td> & Lt; Td square = "tb_2c" & gt; {{ITEMBRAND}} & lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td square = "tb_1c" & gt; Part Number: & lt; / Td> & Lt; Td square = "tb_2c" & gt; {{ITEMSKU}} & lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td square = "tb_1c" & gt; Part Type: & lt; / Td> & Lt; Td square = "tb_2c" & gt; {{U_ITEMCAT}} & lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td square = "tb_1c" & gt; Size & lt; / Td> & Lt; Td square = "tb_2c" & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; / Table & gt;  

I've worked with Jquery

  $ ("tr"). Filter (function () {return $ ("td: last", this) .is (": empty");}) to hide () ;.  

But the platform that is showing the table does not like it.

You can use it: No (),: () and: Empty Selectors Like:

  $ ("tr"). No (": (children with td: n th (2): no (: empty))");  

Demo :


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -