Constructor: Difference between revisions

From Turn.js Documentation
Jump to navigation Jump to search
Line 8: Line 8:


<pre class="javascript">
<pre class="javascript">
$(".magazine").turn([options]);
$("#flipbook").turn([options]);
</pre>
</pre>


Line 14: Line 14:


<pre class="javascript">
<pre class="javascript">
$(".magazine").turn({page: 1, acceleration: true, gradients: true});
$("#flipbook").turn({page: 1, acceleration: true, gradients: true});
</pre>
</pre>



Revision as of 02:35, 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>