Constructor: Difference between revisions

From Turn.js Documentation
Jump to navigation Jump to search
Line 33: Line 33:
</pre>
</pre>


[[Zoom Options]]
[[Zoom Options|See Zoom Options]]


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

Revision as of 03:31, 6 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:

$(".magazine").turn([options]);

For example:

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

See Turn Options

Zoom Constructor

Syntax:

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

For example:

$(".viewport").zoom({flipbook: $(".viewport")});

See Zoom Options

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