[Javascript] scrolling function

jeffrey morin rufus2021 at gmail.com
Fri Apr 2 09:31:47 CDT 2010


Hi,

I am building a javascript scroller that has two buttons. When one is
clicked it slides a list up and the other slides it down. It works fine
except that I can't seem to wrap my head around how to get it to stop once
it reaches the end of my list. Right now it slides by a set number of pixels
but I would like to avoid the white space at the bottom. We're trying to
emulate the functionality on this site.

http://www.thefrisky.com/

If you scroll down it's in the right column marked "most viewed". They have
the two arrows for sliding up and down. When you get to the end of the list
it stops. Mine just slides by a set number of pixels like I said so it keeps
going and gives me white space. Using jQuery but am trying to avoid an
entire plugin because I don't need all of the other options that those
plugins come with.

Any help would be great.

- J


More information about the Javascript mailing list