Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

JS Bin

Public visualization

Viewing a saved revision (read-only)

3ebfe3abc80d4411820c5fdfd10c79a5

JS Bin

0 stars0🌍 Public
JJaloYang
Last edited May 5, 2020
Created on May 5, 2020
Forked from Untitled

This example demonstrates scroll-position detection within a fixed-height container using vanilla JavaScript. The page defines two nested divs: an outer scrollable `divContainer` with a 200-pixel height and an inner `divContent` containing twelve sample paragraphs. When the user scrolls to the bottom, the code triggers an alert and dynamically expands the inner div’s height to 1000 pixels. The implementation relies on the container’s `onscroll` event handler and compares `scrollTop`, `scrollHeight`, and `offsetHeight` properties to determine when the bottom is reached.

AI-generated description

A bare minimum HTML page.

See also React Starter.