Log in
Log in with USB
Inloggen met vingerafdruk wordt binnenkort mogelijk.
The module scrollBars handles the display of scrollbars as well as scrolling funtions. The module has a collect and a send method.
The scrollBars module uses the Overlay Scrollbars plugin as bases for all functionality.
webanizr.collect('scrollBars', parameters, callback)
The collect function can be used to transform a div or body element into a scrollable element. To perform scroll functions on a element, it has to be transformed to a scrollable element.
The collect method of scrollBars accepts the following parameters.
The selector that defines which element(s) you want to convert into scrollable element(s). This uses te query selector syntax: "#mydiv" or ".mydivs"
The id you assign to to this / these elements. You need this id in the send method to perform scroll functions
The callback function that is called after the elements are converted to scrollable elements. There is no data passed to this callback function.
webanizr.send('scrollBars', data, parameters, callback)
The send function is used to perform scroll actions on the scrollable element(s).
The data parameter is not used at this point.
The send method of scrollBars accepts the following parameters:
The id of the scrollable element(s). This has to be the id you assigned in to the element(s) in the collect method.
The type of action you want to perform on scrollable elements. The following types are supported:
The y position you want to scroll to. This parameter is used by the scroll action. You can use css like syntax: 50px, 100% or 0.
The x position you want to scroll to. This parameter is used by the scroll action. You can use css like syntax: 50px, 100% or 0.
The callback function that is called after the actions are performed. The callback function is called with the unaltered data.
A simple scroll demo:
https://cdn.cpmodules.webanizr.com/demo/scrolling/index.html