title: complex jQuery selector not working
body: <p>I'm trying to use this jQuery selector, but I'm not getting the selection that I want. I'm trying to select <code>input</code> tags from <code>table:eq(0)</code> or <code>table:eq(1)</code> that satisfy the selector below. However, <code>table:eq(0)</code> and another random <code>td</code> element is returned.</p>
  
  <pre><code>table:eq(0),table:eq(1) tbody tr.collection-row td:nth-child(2),td:nth-child(3),td:nth-child(4) input
  </code></pre>
  
  <p>I can break this selector into smaller pieces and can verify that it does return the elements I want. I just need the entire selector to be semantically correct.</p>
  
  <p>I'm using this selector in a <a href="https://api.jquery.com/on/" rel="nofollow">delegated event</a>, which is why I'm trying to get it to work as a single selector.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Here's a modified version of the selector that was suggested in the comments, but doesn't work either. </p>
  
  <pre><code>table:eq(0) tbody tr.collection-row td:nth-child(2) input,table:eq(1) tbody tr.collection-row td:nth-child(2) input
  </code></pre>
  
  <p>I'm working on getting the HTML added to this question, but there may be some sensitive information within so I'm in the process of obfuscating some of that away.</p>