Constructor: Difference between revisions

From Turn.js Documentation
Jump to navigation Jump to search
No edit summary
Line 3: Line 3:
Both the flipbook and the zoom viewport have independent constructors.
Both the flipbook and the zoom viewport have independent constructors.


=== Turn Constructor ===
== Turn Constructor ==


Syntax:
Syntax:
Line 19: Line 19:
[[Turn Options|See Turn Options]]
[[Turn Options|See Turn Options]]


=== Zoom Constructor ===
== Zoom Constructor ==


Syntax:
Syntax:

Revision as of 04:14, 9 July 2012

The constructor is where the flipbook or the zoom viewport is created. Therefore, it's called once and cannot be omitted.

Both the flipbook and the zoom viewport have independent constructors.

Turn Constructor

Syntax:

$("#flipbook").turn([options]);

For example:

$("#flipbook").turn({page: 1, acceleration: true, gradients: true});

See Turn Options

Zoom Constructor

Syntax:

$("#zoom-viewport").zoom(options);

See Zoom Options

<yambe:breadcrumb>API</yambe:breadcrumb>