Methods

The methods available for each booklet can be called on one or more booklets at the same time. Methods which return a value, such as an option, when called on more than one selector will return an array of values. Otherwise, the chainability of the elements will be maintained.

destroy

Signature:

.booklet("destroy")

Remove the booklet completely. Returns the element back to its original state.

disable

Signature:

.booklet("disable")

Disable the booklet.

enable

Signature:

.booklet("enable")

Enable the booklet.

option

Signature:

.booklet("option", "name", [value])

Get or set any option. If no value is provided, will act as a getter.

option

Signature:

.booklet("option", [option])

Set multiple options at once by passing in an options object (just like during init). If no options object is provided it returns the complete object of all current options.

next

Signature:

.booklet("next")

Moves the booklet to the next page spread.

prev

Signature:

.booklet("prev")

Moves the booklet to the previous page spread.

gotopage

Signature:

.booklet("gotopage", index)

Moves the booklet to the provided index. Index must either be a zero-based page index or one of the strings "start" or "end".

add

Signature:

.booklet("add", index, html)

Add a new page. Index must either be a zero-based page index where the new page will be inserted or one of the strings "start" or "end". html must be a string of HTML content.

remove

Signature:

.booklet("remove", index)

Remove a page. Index must either be a zero-based page index of the page that will be removed or one of the strings "start" or "end".

Style

Once the booklet is created, the basic generated structure and CSS will appear below. The basic top level classes are bolded.

If more customization is desired, all generated classes are visible in the current jQuery Booklet stylesheet.