Constructor: Difference between revisions
Jump to navigation
Jump to search
Line 22: | Line 22: | ||
$(".viewport").zoom(options); | $(".viewport").zoom(options); | ||
</pre> | </pre> | ||
For example: | |||
<pre class="javascript"> | |||
$(".magazine").turn({page: 1, acceleration: true, gradients: true}); | |||
</pre> | |||
[[Zoom Options]] | [[Zoom Options]] | ||
<yambe:breadcrumb>API</yambe:breadcrumb> | <yambe:breadcrumb>API</yambe:breadcrumb> |
Revision as of 03:28, 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
$(".magazine").turn([options]);
For example:
$(".magazine").turn({page: 1, acceleration: true, gradients: true});
Zoom Constructor
$(".viewport").zoom(options);
For example:
$(".magazine").turn({page: 1, acceleration: true, gradients: true});
<yambe:breadcrumb>API</yambe:breadcrumb>