go to builtbywill.com

options

API

Currently, the booklet API allows for the following direct string commands and integer commands.

  • "next"
  • "prev"
  • integer

Version 1.3.0 opens access to the Booklet() object, ssing the $("#mybook").data("booklet") method, giving access to some public methods. Please note, you can only use this reliably when targeting a booklet with an ID.

See the direct api examples for more information.

  • init(): initialize the booklet.
  • next(): move to forward once.
  • prev(): move backwards once.
  • goToPage(index): move directly to the given page, using 0-based index.
  • addPage(index, html): insert new html, allowing for adding pages on the fly.
  • options: returns the booklet options.

Once your booklet is initialized, you can pass it these direct commands through the API.

Options

Below are all of the default options. Any of these options can be overridden when you initialize your booklet.

When overriding defaults, you simply have to include an options object.