jquery to get the id of first parent div with an id attribute
<p>Suppose I have some HTML that looks like this:</p>

<pre><code>&lt;div&gt;
   &lt;div id="test"&gt;
     &lt;div&gt;
       &lt;div&gt;
         &lt;div&gt;
           &lt;div id="SomeDiv"&gt;
</code></pre>

<p>Now suppose I have <code>TheDiv = $('#SomeDiv');</code> and that from there, I want to get the id of the first parent div that has an id, in this case <code>"test"</code>.</p>

<p>What's the best way to loop through parents to find an ID with jquery?</p>

<p>Thanks.</p>
