title: How to compare two elements without ids or classes jQuery
body: <p>I am having a problem with matching elements in jQuery.
  Basically I have list items, and <code>onclick</code> I want to compare two elements to find out its position within the list, ie.</p>
  
  <pre><code>&lt;ul id="someID"&gt;
      &lt;li&gt;something&lt;/li&gt;
      &lt;li&gt;something&lt;/li&gt;
      &lt;li&gt;something&lt;/li&gt;
  &lt;/ul&gt;
  
  // here is the script
  var row = 0,
      element = $('#someID &gt; li:eq(1)').get(0);
  
  $('#someID &gt; li').each(function(index, value) {
      if (value == element) {
          row = index;
          return false;
      }
  }
  </code></pre>
  
  <p><code>element</code> is in the proper scope and this all should work (or so I think). The only reason I can see that it might not work is that the browser sees each <code>list-item</code> as the same, because its <code>innerHTML</code> is the same and has no <code>id</code> or <code>class</code>.</p>
  
  <p>Is there some other way that I can get the position of a list-item within a list?</p>