2

I have a scrollable list and I would like to know when I've reached the end.

Example:

HTML:

<ol>
    <li>a</li>
    <li>b</li>
    ....
</ol>

CSS:

ol {
    overflow: scroll;
    height: 50px;
}

DEMO

The only way I think you can find out if you've reach the end is to determine the length of all children (all the lis) and add the widths. I actually hope there is a smarter way to do this ?

Jeanluca Scaljeri
  • 26,343
  • 56
  • 205
  • 333

0 Answers0