title: if $(this) is nth-child(x)
body: <p>I am working on a website and I've ran into a problem.</p>
  
  <p>I have a 12x24 table using <code>nth-child()</code> and I want to use jQuery to check which <code>nth-child()</code> is being clicked.</p>
  
  <p>Currently I have tried: </p>
  
  <pre><code>$('table.masteries tr.p0 td').click(function() {
      if($(this) == $('table.masteries tr.p0 td:nth-child(1)')) {
          console.log('true')
      }
  });
  </code></pre>
  
  <p>But I get no response in the console.</p>
  
  <p>The table is layed out as follows:</p>
  
  <pre><code>    &lt;table class="masteries"&gt;
          &lt;tr class="p0"&gt;
              &lt;td&gt;&lt;/td&gt;
  ...
          &lt;/tr&gt;
          &lt;tr class="p4"&gt;
              &lt;td&gt;&lt;/td&gt;
  ...
          &lt;/tr&gt;
          &lt;tr class="p8"&gt;
              &lt;td&gt;&lt;/td&gt;
  ...
          &lt;/tr&gt;
          &lt;tr class="p12"&gt;
              &lt;td&gt;&lt;/td&gt;
  ...
          &lt;/tr&gt;
          &lt;tr class="p16"&gt;
              &lt;td&gt;&lt;/td&gt;
  ...
          &lt;/tr&gt;
          &lt;tr class="p20"&gt;
              &lt;td&gt;&lt;/td&gt;
  ...
          &lt;/tr&gt;
      &lt;table&gt;
  </code></pre>
  
  <p>So I wondered if it wasn't possible to check if <code>$(this)</code> can work in if-statements or not. 
  If it isn't, is there another way of checking for certain <code>nth-child()</code> with jQuery/Javascript if-statements?</p>