1.2.1 • Published 6 years ago

scroll-syncer v1.2.1

Weekly downloads
9
License
MIT
Repository
github
Last release
6 years ago

Scroll Syncer

Synchronize scoll position from one element to several elements

Usage

import ScrollSyncer from 'scroll-syncer'

var ss = new ScrollSyncer(
  true, /* vertical scroll position */
  true, /* horizontal scroll position */
  true  /* use passive event binding */
)

// Synchronize from el1
ss.from(el1)
// Synchronize to el2
ss.to(el2)

// Stop synchronize from el1, but el2 will be kept as synchronize target.
ss.off(el1)
// Stop synchronize to el2, but el1 will be kept as synchronize origin.
ss.off(el2)
// Tear down the synchronizer.
ss.off()
1.2.1

6 years ago

1.2.0

6 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago