I am using following Jquery code for SlideShow
<head>
<title>Simple Slide Show with jQuery</title>
<script type='text/javascript'
src='http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js'>
</script>
<script type="text/javascript">
var imgs = [
'images/photo_1.jpg',
'images/photo_2.jpg',
'images/photo_3.jpg'];
var cnt = imgs.length;
$(function() {
setInterval(Slider, 5000);
});
function Slider() {
$('#imageSlide').fadeOut("slow", function() {
$(this).attr('src', imgs[(imgs.length++) % cnt]).fadeIn("slow");
});
}
</script>
</head>
<body>
<img id="imageSlide" alt="" src="" />
</body>
</html>
I have all all images named like photo_1.jpg, photo_2.jpg and soon.. i am not sure that how many images will be there in the directory.
What i want to know is what code changes should i do so that
1) The jpgs are displayed automatically from that folder ( the image name will be always photo_number.jpg , number will be starting from 1,2,3.. and soon.
2) The slideshow should stop if there is no image available.
Is this possible ?
3) I dont want to use any Server Side Programming