title: How to get image src, after click on other image
body: <p>How to get image src, after click on other image?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).ready(function() {
    $('img.getimage').click(function() {
      alert($(this).attr('src'));
    });
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.sinistra {
    width: 150px;
  }
  
  .getimage {
    width: 50px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div id="content"&gt;
    &lt;div id="mywrap"&gt;
      &lt;img class="getimage" src="http://icons.iconarchive.com/icons/umut-pulat/tulliana-2/128/k-get-icon.png" /&gt;&lt;br /&gt;
  
      &lt;img class="sinistra" src="http://www.bicielettriche.bikeitalia.it/wp-content/uploads/2014/11/bici-elettrica-piaggio.png" /&gt;
    &lt;/div&gt;
  
    &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
  
    &lt;div id="mywrap"&gt;
      &lt;img class="getimage" src="http://icons.iconarchive.com/icons/umut-pulat/tulliana-2/128/k-get-icon.png" /&gt;&lt;br /&gt;
  
      &lt;img class="sinistra" src="https://eradellabicicletta.files.wordpress.com/2013/01/bici-da-corsa-rb1000-team-edition.jpg" /&gt;&lt;br /&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>If clicked on img.getimage need to get src of image that included in same div with ID mywrap.
  I can`t add add any other class or divs.</p>
  
  <p>Here <a href="https://jsfiddle.net/Qartvela/as9osdvc/1/" rel="nofollow noreferrer">fiddle</a></p>