title: get the sibling link class when the the other sibling link is clicked?
body: <p>i have 5 divs , in each divs there's two links as shown in the example below</p>
  
  <pre><code>    &lt;div id="wrapper"&gt;
  &lt;a href="2332" class="first link1"&gt;Link1&lt;/a&gt;&lt;a href="link2" class="link2"&gt;Link2&lt;/a&gt;
     &lt;/div&gt;
  
      &lt;div id="wrapper"&gt;
  &lt;a href="1221" class="second link1"&gt;Link1&lt;/a&gt;&lt;a href="link2" class="link2"&gt;Link2&lt;/a&gt;
     &lt;/div&gt;
  
      &lt;div id="wrapper"&gt;
  &lt;a href="789" class="third link1"&gt;Link1&lt;/a&gt;&lt;a href="link2" class="link2"&gt;Link2&lt;/a&gt;
     &lt;/div&gt;
  
      &lt;div id="wrapper"&gt;
  &lt;a href="345" class="abc link1"&gt;Link1&lt;/a&gt;&lt;a href="link2" class="link2"&gt;Link2&lt;/a&gt;
     &lt;/div&gt;
  
      &lt;div id="wrapper"&gt;
  &lt;a href="123" class="bcd link1"&gt;Link1&lt;/a&gt;&lt;a href="link2" class="link2"&gt;Link2&lt;/a&gt;
     &lt;/div&gt;
  </code></pre>
  
  <p>How can i use javascript/jquery to GET the CLASS of link1(inside the same div not others) when LINK2 is clicked.
  Okay when i clicked the <strong>third</strong> div's <strong>link2</strong> link , it will give me "third" (excluding the link1 which is also a class).</p>
  
  <p>the click function is:</p>
  
  <pre><code>$('.link2').click(function(){
  
  });
  </code></pre>