Script not working in chrome , firefox etc
in Using jQuery
•
10 years ago
`Here is a block of java script code for image slide show.
it woks fine in ie but does not work in any other browser.
plz help me.
// The list of images to display in the slideshow
//creating a array of the image object
var image = new Array("Images/Gallery/Default/20001.jpg","Images/Gallery/Default/20001.jpg",
"Images/Gallery/Default/20002.jpg","Images/Gallery/Default/20003.jpg",
"Images/Gallery/Default/20004.jpg"
)
//variable that will increment through the images
var num = 0
// set the delay between images
var timeDelay
//preload the images in the cache so that the images load faster
//create new instance of images in memory
var imagePreload = new Array()
for (i = 0; i < image.length; i++) {
imagePreload[i] = new Image()
// set the src attribute
imagePreload[i].src = image[i]
}
function image_effects() {
var selIndex = 23;
document.images.slideShow.filters.revealTrans.Transition = selIndex
document.images.slideShow.filters.revealTrans.apply()
document.images.slideShow.filters.revealTrans.play()
}
function slideshow_automatic() {
if (num < image.length) {
num++
//if last image is reached,display the first image
if (num == image.length)
num = 0
image_effects()
//sets the timer value to 4 seconds,we can create a timing loop by using the setTimeout method
timeDelay = setTimeout("slideshow_automatic()", 4000)
document.images.slideShow.src = image[num]
}
}
1