jQuery - create an array containing images located in a server folder
<p>I'm pretty new to jQuery and I am trying to achieve the following solution.  </p>

<p>I am using a nice image carousel/slider that requires me to have a div on the page containing the images that I want the carousel to use.  I want the flexibility to put images in a folder instead of hard coding them, and the images then be displayed, so:</p>

<ul>
<li>a folder (img) on my server containing any number of images</li>
<li>some solution to create a list (array) of the images (their paths)</li>
<li>the list or array to be used with the carousel, whether it just generates the HTML or not I guess is half the problem!  </li>
</ul>

<p>I appreciate the help!</p>

<p>@RobW - as I said I am learning.. </p>

<p>/--- edit: I found a solution using jQuery templates. It may not be the smartest, but here it is:</p>

<p>I created a div that I want the images placed in:</p>

<pre><code>&lt;div id="imageContainer"&gt;&lt;/div&gt;     
&lt;!-- Create template --&gt;
    &lt;script id="imageTemplate" type="text/x-jquery-tmpl"&gt;
        &lt;img id="imageItem" src='../PublishingImages/${Name}' alt="${Desc}" /&gt;
    &lt;/script&gt;
&lt;!-- Get data --&gt;
    &lt;script type="text/javascript"&gt;
        $(document).ready(function () {
            $.getJSON(
                '../_vti_bin/ListData.svc/Images',
                    function(data) {
                        $('#imageTemplate')             //select the template
                            .tmpl(data.d.results)       //bind it to the data
                                .appendTo('#imageContainer');   //render the output
                                    });
                                    }); 
    &lt;/script&gt;
</code></pre>
