title: Using jquery to execute border:none and background-color:white on empty cells
body: <p>So I have this (huge) table , classed with css (big_conv_tbl) . All "empty" cells have a &amp;nbsp inside them , I'm also using an odd/even css script to make the table easier to read (and thus some "empty" cells have a gray background color) . </p>
  
  <p>What I want is to remove the borders and the background-color (set it to white) if the cell is "empty" (in my case if it contains "&amp;nbsp") . Empty-cell:hide does not work .</p>
  
  <p>I wrote a simple jquery script but it doesn't work :</p>
  
  <pre><code>$(".big_conv_tbl tr").each(function() {                           
  
  var VC = $(this).find("td").html().trim();                          
  
  if (VC == ''){                 
      $(this).css('background-color','white');
  }             
  });
  </code></pre>
  
  <p>What am I doing wrong ? 
  I have no classes set for td's , only for rows (odd/even) . Please don't make me class every TD , the table is bloody huge . I appreciate any help</p>
  
  <p>le : </p>
  
  <p>Thanks Nick , I had to edit (not enough char. in comment) .</p>
  
  <p>Here is a simple html page with a small table . For some reason it just won't work</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  
  &lt;script type="text/javascript" src="jquery.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" &gt;
  $(".big_conv_tbl tr td").each(function() {
    if ($.trim($.text([this])) == '') {
      $(this).css('background-color','white');
    }
  });
  &lt;/script&gt;
  
  
  &lt;/head&gt;
  
  
  &lt;body&gt;
  &lt;table width="100%" border="1" class="big_conv_tbl" bgcolor="#999999"&gt;
    &lt;tr&gt;
      &lt;td&gt;asdsads&lt;/td&gt;
      &lt;td&gt;&amp;nbsp;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;sagasag&lt;/td&gt;
      &lt;td&gt;&amp;nbsp;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;sagsagsagsag&lt;/td&gt;
      &lt;td&gt;&amp;nbsp;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>