Reputation: 8322
I have an overflow:auto div with specific max-height. That div contains many items as a list. I try to make a scroll script but seem it missing something.
Here is my code: http://jsfiddle.net/UX5cd/6/
Upvotes: 1
Views: 1131
Reputation: 1
Easiest way:
[code]
$(".orderedList").scrollToElement($(".orderedList .selected"));
[/code]
KR
Upvotes: 0
Reputation: 4247
try adding this:
body { margin: 0; padding: 0; }
to your stylesheet;
Upvotes: 1
Reputation: 39940
try resetting the div's scrollTop to zero before you read the chosen item's offset
Upvotes: 3