title: jQuery move item in an array to index 0 on click
body: <p>So I have this setup an array and then stored each img on the page with an output on doc load:</p>
  
  <pre><code>// Create array to store file path
  var sliderImg = []; 
  // Locate each img on page
  $('.thumbnail').children().each(function() {
  // Take src and store it in array wrapped in img HTML
  sliderImg.push('&lt;img class="stacked" alt="' + $(this).attr('alt') + '" src="' +            $(this).attr('src') + '" /&gt;');
  });
  </code></pre>
  
  <p>There are multiple imgs on this page so if one is clicked how can I move it to the front (index 0 of the array)?</p>
  
  <p>Thanks</p>