Namespace: autoscroll

Marked. autoscroll

Autoscroll functions

Properties:
Name Type Description
speed integer

Current scroll speed

reversed boolean

Current scroll direction

scrolling boolean

Currently animating

paused boolean

Currently paused

Source:
autoscroll.js

Requires

Methods


faster(multiplier)

Speed up scrolling

Parameters:
Name Type Description
multiplier Number

Multiple by which to increase speed

Source:
autoscroll.js
Returns:

new speed

Type
number
Example
Marked.autoscroll.faster()

init()

Initialize and set up DOM objects for autoscroll

Source:
autoscroll.js
Returns:

Autoscroll object

Type
object
Example
Marked.autoscroll.init()

pause()

Toggle pause

Source:
autoscroll.js
Example
Marked.autoscroll.pause()

reverse()

Toggle reverse scroll

Source:
autoscroll.js
Example
Marked.autoscroll.reverse()

setSpeed(scrollSpeed)

Slow down scrolling

Parameters:
Name Type Description
scrollSpeed Number

to set between 1 and 25

Source:
autoscroll.js
Returns:

new speed

Type
boolean | number
Example
Marked.autoscroll.setSpeed()

slower(multiplier)

Slow down scrolling

Parameters:
Name Type Description
multiplier Number

Multiple by which to decrease speed

Source:
autoscroll.js
Returns:

new speed

Type
number
Example
Marked.autoscroll.slower()

start(scrollSpeed)

Start Scrolling

Parameters:
Name Type Description
scrollSpeed number

The speed at which to scroll

Source:
autoscroll.js
Returns:

success result

Type
boolean
Example
Marked.autoscroll.start()

stop(pause)

Stop scrolling

Parameters:
Name Type Description
pause Boolean

Pause instead of stop if true

Source:
autoscroll.js
Example
Marked.autoscroll.stop()

toggle(force)

Toggle scrolling, clear timer If scroll is at a boundary when called, toggle "scrollstuck" and reverse direction if "scrollstuck" is already set

Parameters:
Name Type Description
force boolean

Skip checking for boundaries, force toggle

Source:
autoscroll.js
Returns:

success result

Type
boolean
Example
Marked.autoscroll.toggle()