title: jQuery - OnClick, change background color for table cells always when clicked
body: <p>For example: 
  You have a table, and it has 4 tds and 2 trs. Table's background color is white. If i click to A td, A td should be red, than if i click to B, B td should be red and A td should be red too. If i click to C than, C should be red and B and A should be red too.</p>
  
  <p>I have something like this. But it isnt good, because when i click again i want to change color back to white.</p>
  
  <p><a href="http://jsfiddle.net/k8UgT/193/" rel="noreferrer">http://jsfiddle.net/k8UgT/193/</a></p>
  
  <p>The code i use</p>
  
  <pre><code>&lt;table&gt;
      &lt;tr&gt;
          &lt;td onclick="function()"&gt;AAA&lt;/td&gt;
          &lt;td onclick="function()"&gt;BBB&lt;/td&gt;
          &lt;td onclick="function()"&gt;CCC&lt;/td&gt;
      &lt;/tr&gt;
          &lt;tr&gt;
          &lt;td onclick="function()"&gt;DDD&lt;/td&gt;
          &lt;td onclick="function()"&gt;EEE&lt;/td&gt;
          &lt;td onclick="function()"&gt;FFF&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>$( function() {
    $('td').click( function() {
      $(this).css('background', '#aaa')
    } );
  } );
  </code></pre>