title: how to pass an array to function in jquery
body: <p>I wish to pass an array to a function(can you tell me if im on the right track?)</p>
  
  <p>and then in the function I wish to loop through the values in an array and append each one into the following LI element in HTML</p>
  
  <p>This is what I have so far a user will code in the URL values he wants to pass:</p>
  
  <pre><code>var arrValues = ['http://imgur.com/gallery/L4CmrUt', 'http://imgur.com/gallery/VQEsGHz'];
  calculate_image(arrValues);
  
  function calculate_image(arrValues) {
      // Loop over each value in the array.
      var jList = $('.thumb').find('href');
      $.each(arrValues, function(intIndex, objValue) {
          // Create a new LI HTML element out of the
          // current value (in the iteration) and then
          // add this value to the list.
          jList.append($(+ objValue +));
      });
  }
  }
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;li&gt;
      &lt;a class="thumb" href="" title="Title #13"&gt;&lt;img src="" alt="Title #13" /&gt;&lt;/a&gt;
      &lt;div class="caption"&gt;
          &lt;div class="download"&gt;
              &lt;a href=""&gt;Download Original&lt;/a&gt;
          &lt;/div&gt;
          &lt;div class="image-title"&gt;Title #13&lt;/div&gt;
          &lt;div class="image-desc"&gt;Description&lt;/div&gt;
      &lt;/div&gt;
  &lt;/li&gt;
  </code></pre>