Stop 01

1

Starting point.

Hit ▶ Play Tour below. scrollToSmooth queues all six stops and visits them in sequence via queueScroll().

Stop 02

2

Sequential scrolls.

queueScroll(target) adds to the internal queue. Each animation starts automatically once the previous one ends.

Stop 03

3

Named queue items.

Pass an optional id as the second argument. Call clearQueue(id) to remove a specific stop before it runs.

Stop 04

4

Cancel anytime.

The ■ Cancel button calls cancelScroll(true). The true flag flushes all pending queue items immediately.

Stop 05

5

Any target type.

Queue targets can be an Element, a CSS selector, a pixel value, or a ScrollPoint { x, y } for 2D scrolling.

Stop 06

6

Tour complete.

The queue is now empty. Each stop was added with a single queueScroll(el, 'id') call — six lines, six stops.

Scroll Queue

Press Play to start the guided tour.