Element id of two duplicate class names based on click
<p>I have two divs with different ids but with the same classname. Example: Window1 &amp; Window2...</p>

<pre><code>&lt;div id="Window1" class="name"&gt;
   &lt;span id="Admin"&gt;&lt;/span&gt;
&lt;/div&gt;

&lt;div id="Window2" class="name"&gt;
   &lt;span id="Admin"&gt;&lt;/span&gt;
&lt;/div&gt;
</code></pre>

<p>I want to get the element id of "name" when I click on id "Admin". Obviously the var solution is wrong below but want to set up something close to this...</p>

<pre><code>var Window_id = $(".name").attr("id");
</code></pre>

<p>I hope this explains what I am trying to do. Thanks in advance.</p>
