ScrollSyncSplit(baseElement, leftElement, rightElement, options)

Class ScrollSyncSplit

new ScrollSyncSplit(baseElement, leftElement, rightElement, options)

Creates an instance of ScrollSyncSplit.

Parameters:
Name Type Description
baseElement Element

an element which attach a splitSyncSplit

leftElement Element

an element to be on left side split view

rightElement Element

an element to be on right side split view

options object

options

Properties
Name Type Attributes Default Description
showScrollSyncButton boolean <optional>
false

show scroll sync button on top right corner

scrollSync boolean <optional>
true

true for enable scroll sync

splitView boolean <optional>
true

true for split, false for single view

Members

_contentElements

left, right side content elements

Methods

isScrollSynced() → {boolean}

is scroll synced

Returns:
boolean -
  • true for synced, false for each scroll

isSplitView() → {boolean}

is split view

Returns:
boolean -
  • true for split view, false for single view

scrollTop(top)

scroll top

Parameters:
Name Type Description
top number

scroll top in pixel

sync()

sync scroll

toggleScrollSync()

toggle multi scroll

toggleSplitView()

toggle split