5秒ごとに画像を変更する画像スライダーがありますが、div imgにマウスを合わせるとスライダーを一時停止します。ホバー上の 'theRotator'機能を一時停止して、マウスがdivの外に移動した後に再起動する方法はありますか?皆さんありがとう!要素ホバーの一時停止機能
function theRotator() {
//Set the opacity of all images to 0
$('div.rotator ul li').css({opacity: 0.0});
//Get the first image and display it (gets set to full opacity)
$('div.rotator ul li:first').css({opacity: 1.0});
//Call the rotator function to run the slideshow,
setInterval('rotate()',5000);
}
$(document).ready(function() {
//Load the slideshow
theRotator();
$('div.rotator').fadeIn(1000);
$('div.rotator ul li').fadeIn(1000); // tweek for IE
});
何らかの理由で私はあなたが2回それを実行すると思います?なぜですか? jquery.comで.delay() - >それを読んでみるといいと思います。 – IamStalker