There's not much point in stopping it in mid transition, unless you haven't allowed enough room for each item. But I suppose it could be done.
In the gajaxscroller.js file, use this _animateup() function:
Code:
// -------------------------------------------------------------------
// _animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------
gfeedpausescroller.prototype._animateup=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
setTimeout(function(){scrollerinstance._animateup()}, 100)
else{
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance._animateup()}, 40)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this._swapdivs()
setTimeout(function(){scrollerinstance._rotatemessage()}, this.delay)
}
}
}
and this _rotatemessage() function:
Code:
// -------------------------------------------------------------------
// _rotatemessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------
gfeedpausescroller.prototype._rotatemessage=function(){
var scrollerinstance=this
var i=this.hiddendivpointer
var ceiling=this.feeds.length
this.hiddendivpointer=(i+this.itemsperpage>ceiling-1)? 0 : i+this.itemsperpage
var feedslice=this.feeds.slice(this.hiddendivpointer, this.hiddendivpointer+this.itemsperpage)
this.hiddendiv.innerHTML=formatrssmessage(feedslice, this.showoptions, this.itemcontainer, this.linktarget)
this._animateup()
}
Replace the existing functions of the same name with the above ones.
Bookmarks