I get this weird bug, that in any other browser, the interval gets called every 10 milisecond, but in firefox, it seems like it doesn’t get called ten times a second as it should!
setTimeout(function () {
timerWidth = 0.0;
if (slideIndex === imageUrls.length - 1) {
slideIndex = 0;
} else {
slideIndex++;
}
$("#slideshow-image").css('background-image', 'url("' + imageUrls[slideIndex] + '")');
$("#slideshow-logo").css('background-image', 'url("' + logoUrls[slideIndex] + '")');
$("#slideshow-desc > p").text(descriptions[slideIndex]);
$("#slideshow-logo").fadeIn();
$("#slideshow-desc > p").fadeIn();
}, 400)
setInterval(function () {
timerWidth += 0.1;
$('#timer').css('width', timerWidth + "%");
}, 10)
by ten seconds, the width should be at 100 percent, as it does in other browsers. But in firefox it doesn’t finish in 10 seconds.
1