Sure, there are a few ways to do this, but my hacked up version would be to make the following changes to the .js file (or just download the modified .js file below). The changes to the original code are in red:
Code:
if (typeof autorun=="number" && autorun>0)
window[sliderid+"timer"]=setTimeout(function(){ContentSlider.autoturnpage(sliderid, autorun, cycles || 0)}, autorun)
AND:
Code:
ContentSlider.autoturnpage=function(sliderid, autorunperiod, cycles){
"
"
if (cycles>0){
var slider=document.getElementById(sliderid)
if (nextpagenumber==0)
slider.cyclecount=(typeof slider.cyclecount!="undefined")? slider.cyclecount+1 : 1
if (slider.cyclecount && slider.cyclecount==cycles)
return
}
window[sliderid+"timer"]=setTimeout(function(){ContentSlider.autoturnpage(sliderid, autorunperiod, cycles || 0)}, autorunperiod)
Then, to invoke a content slider that ends after 2 cycles, specify that using the last optional parameter:
Code:
ContentSlider("slider1", 1000, "", "", 2)
Bookmarks