Goes to a given page, or to the last one beforehand, of the Pager widget setup for the given element.


To use with auto-widgets (HTML API) as part of a trigger specification:

  • Action name: "go-to-page".
  • Accepted string arguments: the number of the target page
  • Accepted options: none
<div class="lisn-pager" data-lisn-on-click="@go-to-page:2 +target=#myGoToButton"></div>
<button id="myGoToButton"></button>

Implements

Methods

Constructors

Properties

Methods

Constructors

Properties

do: () => Promise<void>

Goes to the page number given to the constructor. Numbers start at 1.

toggle: () => Promise<void>

Goes to the page number given to the constructor, or if already at this number, goes to the last saved page if any. Numbers start at 1.

undo: () => Promise<void>

Goes to the last saved page number before the action was done. If the action had never been done, does nothing.