title: jQuery create multidimensional array from multiple elements
body: <p>How can I make a multidimensional array with structure like this one for each li with class <code>sl-item</code>:</p>
  
  <pre><code>$imagesList = [
     [1, 123, "&lt;img src=\"/img-src/123.jpg \" /&gt;", "/photo/img-123", "image-alt "],
     [2, 452, "&lt;img src=\"/img-src/452.jpg \" /&gt;", "/photo/img-452", "image-alt "],
  ];
  </code></pre>
  
  <p>First should be just number of array, 1,2,3…, second part is the <code>id</code> of <code>li</code> element, third is the img with img src, fourth is the url from <code>a</code> with class <code>photo-url</code> and fifth is the img alt.
  My structure is the following:</p>
  
  <pre><code>&lt;ul class=”sl-img”&gt;
      &lt;li id=”123” class=”sl-item”&gt;
          &lt;a  class=”photo-url” href=”/photo/img-123”&gt;
              &lt;img alt=”image-alt” src=”/img-src/123.jpg” &gt;
          &lt;/a&gt;
      &lt;/li&gt;
      &lt;li id=”452” class=”sl-item”&gt;
          &lt;a  class=”photo-url” href=”/photo/img-452”&gt;
              &lt;img alt=”image-alt” src=”/img-src/452.jpg” &gt;
          &lt;/a&gt;
      &lt;/li&gt;
      .....
  &lt;/ul&gt;
  </code></pre>