title: Clear an image preview file that was removed from the array with jquery
body: <p>I tried to figure this out for over a month now. I cannot get the image to be removed from the array once the image was clicked on 'x' on the previewer.</p>
  
  <p><a href="http://jsfiddle.net/ERZVC/2/" rel="nofollow">http://jsfiddle.net/ERZVC/2/</a></p>
  
  <p>My attempt to use splice failed!</p>
  
  <pre><code>$('#list').on('click', '.remove_img_preview',function () {
          $(this).parent('span').remove();
  
          //this is not working...
          var i = array.indexOf($(this));
          if(i != -1) {
              array.splice(i, 1);
          }
          // tried this too:
          //$(this).parent('span').splice( 1, 1 );
  
          count--;
      });
  </code></pre>
  
  <p>please help me out!</p>
  
  <p>EDIT:</p>
  
  <p>The reason I need it removed from the array or the input file list is because when submitting the form, it should only upload the images that are in the previewer and not the ones that were removed from it.</p>
  
  <p>Example: If I upload image1, image2, image3, then remove image2, it should only upload image1 and image3 on submission.</p>