title: Jquery selector all cells in table except
body: <p>I am trying to find the correct selector to be able to change the background to blue if any Hello cell is clicked, but not if Goodbye is clicked.  Adding a class to the Hello cells is a possible option, but not preferred.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(function() {
    $('#myTable td').click(function() {
      $('#myTable').addClass('unfocused');
    });
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.unfocused {
    background-color: blue;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;table id='myTable'&gt;
  
    &lt;tr&gt;
      &lt;td&gt;Hello&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Hello&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Hello&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Hello&lt;/td&gt;
    &lt;/tr&gt;
  
    &lt;tr&gt;
      &lt;td&gt;
        &lt;table id='otherTable'&gt;
          &lt;tr&gt;
            &lt;td&gt;Something&lt;/td&gt;
          &lt;/tr&gt;
        &lt;/table&gt;
      &lt;/td&gt;
    &lt;/tr&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I have tried:</p>
  
  <pre><code> $('#myTable td').not('#otherTable td').click(....
   $('#myTable td').not('#otherTable').click(....
  </code></pre>
  
  <p>and those dont work.  </p>
  
  <p>attached a fiddle.</p>
  
  <p><a href="https://jsfiddle.net/2wqxeuw9/1/" rel="nofollow noreferrer">Fiddle</a></p>