new Snap(cfg)
a snap plugin for xscroll,wich support vertical and horizontal snap.
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cfg |
object |
|
Extends
Members
-
staticSnap.pluginIdstring
-
a pluginId
Methods
-
staticSnap.pluginDestructor()
-
detroy the plugin
-
staticSnap.pluginInitializer(){Snap}
-
plugin initializer
-
staticSnap.render(){Snap}
-
render snap plugin
-
staticSnap.snapTo(col, row, duration, easing, callback){Snap}
-
scroll to a col and row with animation
Name Type Description col
number col-index row
number row-index duration
number duration for animation ms easing
string easing for animation callback
function callback function after animation -
staticSnap.snapToCol(col, duration, easing, callback){Snap}
-
scroll to a col with animation
Name Type Description col
number col-index duration
number duration for animation ms easing
string easing for animation callback
function callback function after animation -
staticSnap.snapToRow(row, duration, easing, callback){Snap}
-
scroll to a row with animation
Name Type Description row
number row-index duration
number duration for animation ms easing
string easing for animation callback
function callback function after animation