title: Show img from img slider in modal on click
body: <p>I have an image-slider and I want the user to be able to click on the currently displayed img and then see it in a modal. The difficulty is that the images are layered on top of one another. Hence, with my current approach of putting whatever img was clicked in the modal, the topmost img is the only one that can ever be shown in the modal. </p>
  
  <p>Is there a way to display (in the modal) whichever image is currently being displayed in the slider when the user clicks the slider? You can see my current progress at this <a href="http://jsfiddle.net/corduroy_joy/t8Lyarmc/1/" rel="nofollow">fiddle</a>. Here's the jquery that I'm currently using to show the clicked on img in a modal: </p>
  
  <pre><code>  $(window).load(function() {
              $('img').on('click', function() {
                  var sr = $(this).attr('src');
                  $('#mimg').attr('src', sr);
                  $('#myModal').modal('show');
              });
          });
  </code></pre>
  
  <p>Thanks in advance for any help!</p>