title: Find previous occurrence of an element
body: <p>I have the following html:</p>
  
  <pre><code>&lt;h4&gt;Testing&lt;/h4&gt;
  &lt;h3&gt;Test&lt;/h3&gt;
  &lt;h3&gt;Test2&lt;/h3&gt;
  &lt;h4&gt;Testing2&lt;/h4&gt;
  </code></pre>
  
  <p>If I have the element <code>&lt;h3&gt;Test2&lt;/h3&gt;</code> referenced in a variable, how can I find <code>&lt;h4&gt;Testing&lt;/h4&gt;</code>? The one <strong>before</strong> the referenced element, not after.</p>