0

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.

2 Answers 2

1

You can try this jquery plugin.

http://demos.flesler.com/jquery/scrollTo/

Sign up to request clarification or add additional context in comments.

Comments

0

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.

Thanks.

Comments

Your Answer

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.

Ask question

Explore related questions

See similar questions with these tags.