Scroll To Top

Enter a query to search our site. Note that you can use "*" and "?" as wildcards. Enclosing more than one word in double quotes ("CSS Layout") will search for the exact phrase.

PVII Knowledge Base

1. Select a product ...
2. Select category ...
3. Search the Knowledge Base...

Question #107

I have a looping GeeWizz scroller, is it possible to limit the number of times it loops? I only want it to loop 2 times and then stop.

The Answer

Prepared Jul. 2003 by Gerry Jacobsen, PVII

Yes, it's possible to control the number of loops in GeeWizz, with a couple of code tweaks.

We'll need to add a counter to the looping code. Open your page in code view and follow these simple editing steps:

1. Add this line directly above the P7_moveScroll function:

var theCount=0;

so it looks like this:

var theCount=0;
function P7_moveScroll(co,md,op,dy,cy) { //v2.9 by PVII

2. Locate the last lines of the P7_moveScroll fucntion:

}else{if(op>0 && g.toMove){

-change it to read like this:

}else{if(op>0 && g.toMove){>
//add loop counter

3. That's it! The number of loops is controlled by this line:


the 2 will stop the loop after two loops, change it to three if you want three loops before it stops.

Back to the questions list