Animated page scrolling ... in a Div?

A

Austin Pickett

Hey, I have been reading up on animated page scrolling which seems
fairly simple by using window.scrollTo(x, y) among with other things.
But is it possible to scroll within an overflowed div? would I have to
getElementById("...") to execute this certain function? Or am I going
at it a whole different way.

Thanks.
 
T

Thomas 'PointedEars' Lahn

Austin said:
Hey, I have been reading up on animated page scrolling which seems fairly
simple by using window.scrollTo(x, y) among with other things. But is it
possible to scroll within an overflowed div?

Yes, you can assign to the `scrollTop' and `scrollLeft' properties of the
element object. Note that automated scrolling introduces an
usability/accessibility issue.
would I have to getElementById("...") to execute this certain function?

Probably yes. You need a reference to the element object, and D::gEBI() can
provide it.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top