I’ve got own gallery code like:
// Gallery
$(function() {
var images = $('#gallery ul li img');
var next = 0;
var timer;
var delay = 5000;
images.click(function() {
if($(this).hasClass('current')) return false; // Prevent from re-showing
$('#gallery ul li.current').toggleClass('current'); // Change current highlighted photo
$(this).parent().toggleClass('current'); // to $(this)
$('#gallery img#show-window').attr('src', $(this).data('src')); // Change viewed photo
$('#gallery .panel h2').text($(this).attr('title')); // Set title
$('#gallery .panel p').text($(this).attr('alt')); // Set description
next = $.inArray(this, images) + 1;
clearTimeout(timer);
timer = setTimeout(function() {
images[next % images.length].click();
}, delay);
});
images[0].click();
});
And if I run it on Chromium (Arch Linux 15.0.874.121 (Build 0 Linux)) it is’t showing image until I click on any of the gallery previews and even then it isn’t changing to next picture after 5s. It works on Firefox 8.0 and Opera 11.52.
Have you tried the “doTimeout” function?