Hi, I know nothing of js yet, I’m still studying CSS & PHP. So I’m just looking for a ready made script for vertical scrolling.
I found one that does exactly that, but all the css styling is done in the javascipt, so I was completely lost. I want to be able to just enter the html (into the js array if neccessary, I can do that much lol) and have it scroll upwards, simple as that.
The nearest thing I could find to what I want is this Creating a vertical content scroller using DHTML I can style my div & images myself, then all I need to do is enter the html and away it goes, but it functions just like the marquee tag in that it waits for the entire content to clear before it starts scrolling again.
Hmm, he’s using a url rewrite, all pages have the same url. Its ‘Vertical 5’ on the image scripts page (except I want it to scroll upwards). I’m looking for something that continuously scrolls, doesn’t wait for the last item to clear the element before starting the next iteration.
They are only small 200px images, so it will load fast enough.
That second script does exactly what in that I can just paste the js and know it will work, then add in the html where I want and it will scroll and stop on mouseover, but it waits for the last image to completely clear the div before the first image enters the bottom of the div. Its not a big problem, it would just be nice if I could find something that continuously scrolls with no gaps.
In terms of the functionality you require the code at Huntingground sounds as if it is closest to your needs.
It can scroll up rather than down by changing the value of the variable “dir”. zero is up, one is down.
It does load the images from an array but they could be inserted in the html if you so wish although a modification to the javascript would be required.
The html has a div for the viewport and two divs to hold the images.
The two divs (id=scroller1 and id=scroller2) are essentially the same they both contain all the images.
The javascript scrolls both scroller1 and scroller2. So when scroller1 is disappearing scroller2 is appearing. When scroller1 disappears entirely it is repositioned to where scroller2 has got to.