Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I have a div which has a max height and a scroll bar on it.
In the div is a large list of items
(<ul><li></li>...</ul>)
How do i in JavaScript make it so on page load it scrolls the div so that it is showing a certain list item?
Thanks.
You can try this jquery plugin.
http://demos.flesler.com/jquery/scrollTo/
Add a comment
you can try to do with the scrollTop property of div. for an example.
div.scrollTop=200
you can make a function and call it on onload event. may help you.
onload
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.