title: Determine which element comes first in the HTML/DOM?
body: <p>I need to determine which element comes first in my markup, such as an <code>input</code> or <code>select</code>. For example</p>
  
  <pre><code>&lt;body&gt;
      &lt;input type="text" /&gt;
      &lt;select&gt;&lt;option&gt;Test&lt;/option&gt;&lt;/select&gt;
  &lt;body&gt;
  </code></pre>
  
  <p>In this case, the <code>input</code> comes first in the DOM whereas</p>
  
  <pre><code>&lt;body&gt;
      &lt;select&gt;&lt;option&gt;Test&lt;/option&gt;&lt;/select&gt;
      &lt;input type="text" /&gt;
  &lt;body&gt;
  </code></pre>
  
  <p>in this case, <code>select</code> comes first. Any way to do this using jQuery? Thanks</p>
  
  <p>EDIT: Just to clarify, I don't want the very first element, I ONLY want to know if between the input and select element, which comes first. There could be other elements before the <code>select</code> and <code>input</code> elements.</p>