how to select specific <span> under <div>
<p>I have a structure something similar to,</p>

<pre><code>&lt;div class="div1"&gt;
    &lt;a class="myimg" href="#"&gt;clickme1&lt;/a&gt;
    &lt;span&gt;myspan1&lt;/span&gt;
    &lt;/div&gt;

    &lt;div class="div2"&gt;
     &lt;a class="myimg" href="#"&gt;clickme1&lt;/a&gt;
      &lt;span&gt;myspan2&lt;/span&gt;
    &lt;/div&gt;
</code></pre>

<p>CSS</p>

<pre><code>&lt;style type="text/css"&gt;
    .div1
    {
      border: 1px solid red;    

    }
     .div2
    {
      border: 1px solid black;    

    }
     .test
    {
      border: 1px solid yellow;    

    }

    &lt;/style&gt;



&lt;script type="text/javascript"&gt;
        $(function () {
            $("a.myimg").click(function () {
                alert($(this).html());
                $("span").addClass("test");

            });



        });
</code></pre>

<p>now when I click on <code>&lt;a&gt;</code> span in both the divs are getting affected, What I want is if I click on div1 <code>&lt;a&gt;</code> then it should affect span1, and same for div 2. How to achive his in jquery.</p>

<pre><code>    &lt;/script&gt;
</code></pre>

<p>EDIT:
Is it possible by using context, something similar to,</p>

<pre><code>$("a.myimg",context).click(function () {
</code></pre>
