Sure. Attached is the default contentslider.js file, modified to include "pause" onmouseover feature. Since you mentioned you had customized the file already yourself, the changes you need to make based on the default file are:
1) Replace the code:
Code:
if (typeof autorun=="number" && autorun>0) //if autorun parameter (int_miliseconds) is defined, fire auto run sequence
window[sliderid+"timer"]=setTimeout(function(){ContentSlider.autoturnpage(sliderid, autorun)}, autorun)
with:
Code:
if (typeof autorun=="number" && autorun>0){ //if autorun parameter (int_miliseconds) is defined, fire auto run sequence
window[sliderid+"timer"]=setTimeout(function(){ContentSlider.autoturnpage(sliderid, autorun)}, autorun)
document.getElementById(sliderid).mouseisover=0
document.getElementById(sliderid).onmouseover=function(){this.mouseisover=1}
document.getElementById(sliderid).onmouseout=function(){this.mouseisover=0}
}
And replace function ContentSlider.autoturnpage=function(sliderid, autorunperiod) with the below instead:
Code:
ContentSlider.autoturnpage=function(sliderid, autorunperiod){
if (document.getElementById(sliderid).mouseisover==0){
var paginatelinks=document.getElementById("paginate-"+sliderid).getElementsByTagName("a") //Get pagination links
var nextpagenumber=parseInt(paginatelinks[paginatelinks.length-1].getAttribute("rel")) //Get page number of next DIV to show
ContentSlider.turnpage(sliderid, nextpagenumber) //Show that DIV
}
window[sliderid+"timer"]=setTimeout(function(){ContentSlider.autoturnpage(sliderid, autorunperiod)}, autorunperiod)
}
Bookmarks