Show:

Class: iScroll

iScroll

new iScroll()

adapters/iScroll.js, line 11

iScroll adapter class for the Scrolled mixin.

See:

Extends

  • module:Scrolled

Methods

scroll(){Widget}

adapters/iScroll.js, line 35

Initializes the iScroll scroller. If called and the scroller already exists it's refresh()ed.

Related options:

  • iscroll_options: config object to use with the iScroll constructor.
  • horizontal: if true and grid_layout option is off then vertical scroller is disabled.
  • grid_layout: if true the vertical scroller will not be disabled.
See:

scrollTo(element, time, easing){Widget}

adapters/iScroll.js, line 82

Scrolls to specified element, a fixed location, or by a specified offset. If an object is used for element then it has to contain the following:

  • x: the horizontal offset to scroll to in pixels, or offset to move to if by is true.
  • y: the vertical offset to scroll to in pixels, or offset to move to if by is true.
  • [by]: if true then iScroll's scrollBy() will be used instead of scrollTo().
Name Type Description
element HTMLElement | Object

the element to scroll to or an object containing the offsets.

time number optional

duration of the scroll in milliseconds.

easing string optional

a name of an easing function supported by iScroll.

See:

unscroll(){Widget}

adapters/iScroll.js, line 60

Destroys the scroller.

See: