- permabanned Arf
- May 29, 2001
-
by Ozma
|
Got an issue with firefox, or more likely with Opera and IE being forgiving with my retarded code.
Just trying to scroll a div vertically. I've got the content div nested within another container div with overflow:hidden; set, and I'm using this basic function to scroll the div up:
code:var pos = 270
function Scroll() {
obj = document.getElementById('scrollerdiv');
pos -= 1;
obj.style.top=pos;
window.setTimeout("Scroll();",50);
}
window.onLoad = Scroll();
I haven't added in anything to stop the div scrolling yet but I'll just add in an if statement. Anyway this all works just as I'd like in Opera and IE, but in Firefox the div stays hidden, until a certain amount of time passes and it appears, static. If I change the delay on the setTimeout to a lower value, or lower the position variable it appears quicker, so its running the function fine, but it doesn't look like its redrawing the div until the reaches the top of the container when it stops (which is not how i want it to behave anyway).
Any help would be awesome.
|
#
¿
Mar 3, 2009 03:09
|
|
- Adbot
-
ADBOT LOVES YOU
|
|
#
¿
May 4, 2024 14:45
|
|
- permabanned Arf
- May 29, 2001
-
by Ozma
|
Thanks for your help, turns out it was the pixel thing. Also taken on board your comments about form. Don't worry, this is not going anywhere near anything important.
|
#
¿
Mar 4, 2009 04:28
|
|