title: jQuery download all files within list
body: <p>Is it possible to download all files within in a ul list, with a button or link, using jQuery?</p>
  
  <pre><code>&lt;ul&gt;
    &lt;li&gt; &lt;a href="/downloads/1231/file-01.zip"&gt;file-01.zip&lt;/a&gt; &lt;/li&gt;
    &lt;li&gt; &lt;a href="/downloads/5432/file-02.jpg"&gt;file-02.jpg&lt;/a&gt; &lt;/li&gt;
    &lt;li&gt; &lt;a href="/downloads/2234/file-03.pdf"&gt;file-03.pdf&lt;/a&gt; &lt;/li&gt;
  &lt;/ul&gt;
  &lt;a href="#"&gt;Download all files&lt;/a&gt;
  </code></pre>
  
  <p>Would be nice if they could be zipped, but not necessary (could just download multiple files).</p>
  
  <p>I've seen the following <a href="https://github.com/biesiad/multiDownload" rel="nofollow">https://github.com/biesiad/multiDownload</a></p>
  
  <pre><code>&lt;ul&gt;
    &lt;li&gt; &lt;a id="1" href="/downloads/1231/file-01.zip"&gt;file-01.zip&lt;/a&gt; &lt;/li&gt;
    &lt;li&gt; &lt;a id="2" href="/downloads/5432/file-02.jpg"&gt;file-02.jpg&lt;/a&gt; &lt;/li&gt;
    &lt;li&gt; &lt;a id="3" href="/downloads/2234/file-03.pdf"&gt;file-03.pdf&lt;/a&gt; &lt;/li&gt;
  &lt;/ul&gt;
  &lt;a id='t' href=""&gt;trigger&lt;/a&gt;
  
    &lt;script type="text/javascript" language="javascript" charset="utf-8"&gt;
      $('#1').multiDownloadAdd();
      $('#2').multiDownloadAdd();
      $('#3').multiDownloadAdd();
      $('#t').multiDownload('click');
    &lt;/script&gt;
  </code></pre>
  
  <p>However, my download lists will have varying amounts of list items within them, and I will have multiple download lists on the same page.</p>
  
  <p>I need some code that could count all items within the list, and add them to the 'multiDownloadAdd'</p>
  
  <p>There needs to be a method that will allow only the files within same UL to download together.</p>
  
  <p>Also the server creates a folder for each download, so each file has a separate folder. </p>