Constructor: Difference between revisions

From Turn.js Documentation
Jump to navigation Jump to search
No edit summary
No edit summary
 
(17 intermediate revisions by the same user not shown)
Line 4: Line 4:


== Turn Constructor ==
== Turn Constructor ==
Syntax:
<pre class="javascript">
$("#flipbook").turn([options]);
</pre>
For example:


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


== Zoom Constructor ==
== Zoom Constructor ==
Syntax:


<pre class="javascript">
<pre class="javascript">
$(".viewport").zoom(options);
$("#zoom-viewport").zoom(options);
</pre>
</pre>
[[Zoom options]]
 
== See also ==
 
* [[Turn Options|See Turn Options]]
* [[Zoom Options|See Zoom Options]]


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

Latest 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});

Zoom Constructor

Syntax:

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

See also

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