I need help with a jquery script, I want to change the img src path from image_1.jpg to image_2.jpg, image_3.jpg, .. in the div with id type_a_images
. The number of images in the folder is completely random, so I need the script to check how many images are in the folder and set this number to maxValue
in the slider script. What I want is a similar slider to the one in this page.
Can you help me with this? Thanks.
HTML
<div id="type_a_images">
<p>
<img src="../slider_images/type_a/image_1.jpg">
</p>
</div>
<div id="type_a_slider"></div>
JQUERY
$(function() {
$( "#type_a_slider" ).slider({
value: 1,
min: 0,
max: maxValue,
step: 1,
slide: function( event, ui ) {
??????????;
}
});
});