上部に基本的な jquery 画像スライダーがある Web ページがあります。ブラウザ ウィンドウを最小化してから再度最大化すると、アニメーションの速度が 2 倍になるという問題が発生しています。これは chrome、ff、ie で確認されていますが、毎回ではありません。速度を上げる前に、サイズを複数回変更する必要がある場合があります。なぜそれがそれをするのか誰にも分かりますか?ここにページがあります - http://theatlasconsultingjobs.hiringhook.com/jobseeker/Search.aspx
そして、これがスライダーのjqueryです。
var fadeDuration=2000;
var slideDuration=4000;
var currentIndex=1;
var nextIndex=1;
$(document).ready(function()
{
$('ul.slideshow li').css({opacity: 0.0});
$("'ul.slideshow li:nth-child("+nextIndex+")'").addClass('show').animate({opacity: 1.0}, fadeDuration);
var timer = setInterval('nextSlide()',slideDuration);
})
function nextSlide(){
nextIndex =currentIndex+1;
if(nextIndex > $('ul.slideshow li').length)
{
nextIndex =1;
}
$("'ul.slideshow li:nth-child("+nextIndex+")'").addClass('show').animate({opacity: 1.0}, fadeDuration);
$("'ul.slideshow li:nth-child("+currentIndex+")'").animate({opacity: 0.0}, fadeDuration).removeClass('show');
currentIndex = nextIndex;
}