title: Hiding a table column if the containing cells are empty with jQuery
body: <p>I have a table of the following kind:</p>
  
  <pre><code>&lt;table id="mytable" width="500" border="1" cellspacing="0" cellpadding="0"&gt;
    &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;&lt;span&gt;1&lt;/th&gt;&lt;th&gt;&lt;span&gt;2&lt;/th&gt;&lt;th&gt;&lt;span&gt;3&lt;/th&gt;
    &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;span&gt;1/span&gt;&lt;/td&gt;
      &lt;td&gt;&lt;span&gt;&lt;/span&gt;&lt;/td&gt;
      &lt;td&gt;&lt;span&gt;2/span&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;span&gt;1&lt;/span&gt;&lt;/td&gt;
      &lt;td&gt;&lt;span&gt;&lt;/span&gt;&lt;/td&gt;
      &lt;td&gt;&lt;span&gt;2&lt;/span&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;span&gt;1&lt;/span&gt;&lt;/td&gt;
      &lt;td&gt;&lt;span&gt;&lt;/span&gt;&lt;/td&gt;
      &lt;td&gt;&lt;span&gt;2&lt;/span&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>What I need to do is - hide all the columns of this table where the <code>&lt;span&gt;</code> element contained by the table cell is empty. I will need to hide the cell fully, with the <code>&lt;th&gt;</code> element on the top. In my example above it's the middle column but there may be a lot of them, not only one.</p>
  
  <p>Could anybody advise over this?</p>
  
  <p>Thanks in advance.</p>