title: How to properly use nth-child in jQuery to step through objects of a type?
body: <p>I've run into a bit of an odd bug which seems specific to the <code>nth-child</code> selection syntax in <code>jQuery</code>.  I can use <code>$('list').each()</code> successfully to step through only the lists in the HTML below, however when using the <code>nth-child</code> selection clause it seems to count the <code>&lt;br /&gt;</code> tag between the two <code>list</code> blocks.</p>
  
  <p>For the HTML:</p>
  
  <pre><code>&lt;list id="c" view="vw_project_content" where="`project` = %%2%%"&gt;
      &lt;item&gt;
          &lt;b&gt;$$title$$&lt;/b&gt;&lt;br /&gt;
          $$message$$
          &lt;br /&gt;
      &lt;/item&gt;
  &lt;/list&gt;
  &lt;br /&gt;
  Discussion:
  &lt;list id="p" view="vw_project_posts" where="`project` = %%2%%" limit="100"&gt;
      &lt;item&gt;
          &lt;b&gt;$$poster_id$$&lt;/b&gt;&lt;br /&gt;
          $$message$$
          &lt;br /&gt;
      &lt;/item&gt;
  &lt;/list&gt;
  </code></pre>
  
  <p>And the following code:</p>
  
  <pre><code>console.log($('list:nth-child(1)'));
  console.log($('list:nth-child(2)'));
  console.log($('list:nth-child(3)'));
  </code></pre>
  
  <p>I receive the output:</p>
  
  <pre><code>[list#c, prevObject: jQuery.fn.init(1)]
  [prevObject: jQuery.fn.init(1)]
  [list#p, prevObject: jQuery.fn.init(1)]
  </code></pre>
  
  <p>However, if I remove the <code>&lt;br /&gt;</code> between the two <code>list</code> blocks it produces:</p>
  
  <pre><code>[list#c, prevObject: jQuery.fn.init(1)]
  [list#p, prevObject: jQuery.fn.init(1)]
  [prevObject: jQuery.fn.init(1)]
  </code></pre>
  
  <p>Is there a proper way to select the <code>nth-child</code> of a specific type reliably, without needing to know what exists between the targeted blocks?</p>