I have a dropdown list with animal options:
<select id="animal">
<option>Choose an animal </option>
<option value="1">animal 1 </option>
<option value="2">animal 2</option>
<option value="3">animal 3 </option>
</select>
Furthermore, I have a 2-dimensional array containing image sources:
var pictureList = [
["images/img1.jpg","images/img2.jpg"],
["images/img3.jpg","images/img4.jpg", "images/img5.jpg"],
["images/img6.jpg"]
];
I need help creating a script to extract images from the array and combine them into a single image list. For example, if I select "animal 1," I want the following output:
<ul id="slider">
<li><img class="imageClass" src="images/img1.jpg"/></li>
<li><img class="imageClass" src="images/img2.jpg"/></li>
<ul>
For "animal 2":
<ul id="slider">
<li><img class="imageClass" src="images/img3.jpg"/></li>
<li><img class="imageClass" src="images/img4.jpg"/></li>
<li><img class="imageClass" src="images/img5.jpg"/></li>
<ul>