title: jQuery: Fill array with images from a folder. or use AJAX to load images from a folder
body: <p>I want to dynamically insert the images inside a folder into an array to be used as a thumbnail. </p>
  
  <p>I have read some questions like this one.</p>
  
  <p><a href="https://stackoverflow.com/questions/7230579/dynamically-add-images-jquery">Dynamically add images jquery</a></p>
  
  <p>However, what I want to do is not to declare the content of the array.</p>
  
  <p>I don't want to do it this way</p>
  
  <pre><code>var images = {'image1':'assets/img/linkedin_30px.png','image2':'assets/img/twitter_30px.png'}
  </code></pre>
  
  <p>instead what I want is</p>
  
  <pre><code>var images = [];
  </code></pre>
  
  <p>and then I want to fill the array, or possibly JSON when the page loads.</p>
  
  <p>I've read that I can use AJAX but I do not how to use it. so if array is possible please help. Thanks.</p>