Views
Actions

Method: pages

From Turn.js Documentation
(Difference between revisions)
Jump to: navigation, search
 
Line 20: Line 20:
 
$("#flipbook").turn("pages", 5);
 
$("#flipbook").turn("pages", 5);
 
</pre>
 
</pre>
 
==See also==
 
* [[Property: pages|Property: pages]]
 
  
 
Another example:
 
Another example:
Line 32: Line 29:
 
</pre>
 
</pre>
  
 +
==See also==
 +
* [[Property: pages|Property: pages]]
 
<yambe:breadcrumb>Turn Methods</yambe:breadcrumb>
 
<yambe:breadcrumb>Turn Methods</yambe:breadcrumb>

Latest revision as of 18:40, 6 July 2012

Sets the number of pages. If the number of pages is less than the current one, the additional pages will be removed from the flipbook.

Parameter Type Description Default Value
pages Number Amount of pages You must specify this parameter

Example:

$("#flipbook").turn("pages", 5);

Another example:

$("#flipbook").turn("hasPage", 10); // It’s true. 
$("#flipbook").turn("pages", 5); // Sets 5 pages
$("#flipbook").turn("hasPage", 10); // Returns false

[edit] See also

Main Page > API > Turn Methods > Method: pages