aggiungi queste 3 variabili
(comunque lo script non e' fatto bene: non si espone tutto cosi' a livello di window, jquery ha un sistema per estendersi via plugin decisamente evoluto)
$autoplay=true;
$autoplayTimer = 5000;
$autoplayTimeout=false;
e le parti in rosso
chiaramente $autoplay e' un booleano che puoi usare qualora volessi aggiungere all' interfaccia un play/pausecodice:function BackgroundLoad($this,imageWidth,imageHeight,imgSrc){ $this.fadeOut("fast",function(){ $this.attr("src", "").attr("src", imgSrc); //change image source FullScreenBackground($this,imageWidth,imageHeight); //scale background image $preloader.fadeOut("fast",function(){$this.fadeIn("slow");}); var imageTitle=$img_title.data("imageTitle"); if(imageTitle){ $this.attr("alt", imageTitle).attr("title", imageTitle); $img_title.fadeOut("fast",function(){ $img_title.html(imageTitle).fadeIn(); }); } else { $img_title.fadeOut("fast",function(){ $img_title.html($this.attr("title")).fadeIn(); }); } if($autoplay) autoplayStart() }); } function autoplayStart(){ if($autoplayTimeout) clearTimeout($autoplayTimeout) if($autoplay) $autoplayTimeout=setTimeout(function(){$nextImageBtn.trigger('click')},$autoplayTimer) }
ciao

Rispondi quotando