i have the following code for making a layer scroll with the page, but how do i make it scroll smoother?
----------------------------------------------
<script>
ie=document.all?1:0
n=document.layers?1:0
var moveOnScroll=true
function checkScrolled(){
divMenu.style.top=eval(scrolled)+150
}
scrolled=n?"window.pageYOffset":"document.body.scrollTop"
if(moveOnScroll) ie?window.onscroll=checkScrolled:checkScrolled();
</script>
----------------------------------------------
http://www.newbie-developer.com - Newbie web-developer community.






cadeh posted this at 01:44—2nd May 2002.
They have: 33 posts
Joined: Apr 2002
would the css "position" property work? Like
position: fixed
Not sure which browsers this works in though.
http://www.cadeh.com - biz (or lack of)
http://me.cadeh.com - wanna see how dorky I am?
korndragon posted this at 03:31—2nd May 2002.
They have: 87 posts
Joined: Dec 2001
nope, thats the 1st thing i tried, hoping it would work like bg pics...
Abhishek Reddy posted this at 05:02—2nd May 2002.
He has: 3,285 posts
Joined: Jul 2001
Try reducing the increments -- change 150 to something like 50 and see what happens.
korndragon posted this at 05:57—2nd May 2002.
They have: 87 posts
Joined: Dec 2001
that just tells how far the layer is from the top of the page so the scoll stays even, changing it still doesn't make it smooth.
i wrote a different script that takes a different approach, but it still is jagged.... look at http://www.korndragon.net
http://www.newbie-developer.com - Newbie web-developer community.
Abhishek Reddy posted this at 08:51—2nd May 2002.
He has: 3,285 posts
Joined: Jul 2001
Ehh, should've read it more carefully. Sorry.
If I'm right, the menu is supposed to scroll with the page? On http://www.korndragon.net nothing happens.
abhishek.geek.nz
korndragon posted this at 21:04—2nd May 2002.
They have: 87 posts
Joined: Dec 2001
on my computer it works... you probably dont use IE4+ huh?
http://www.newbie-developer.com - Newbie web-developer community.
Abhishek Reddy posted this at 20:45—3rd May 2002.
He has: 3,285 posts
Joined: Jul 2001
IE 5.5
Mike Feury posted this at 21:51—3rd May 2002.
They have: 48 posts
Joined: May 2002
Scrolls for me with IE 5.5
Anonymous posted this at 00:29—9th May 2002.
They have: 4,713 posts
Joined: Jan 1970
Doesn't work in IE5.5 (not sure `bout 6).
To cause a to scroll, set the overflow property to auto
.menu {overflow:auto;}
If the content of the overflows either the x or y axis, a scrolbar will appear.
Mike Feury posted this at 04:28—9th May 2002.
They have: 48 posts
Joined: May 2002
Doesn't work in any browser except latest IE for Mac, according to westciv.com
Mike.
- -
Atlantic Bridge Publishing
Original quality e/books for sale