Page Object: Difference between revisions

From Turn.js Documentation
Jump to navigation Jump to search
(Created page with "We're still working on this page. <yambe:breadcrumb>API</yambe:breadcrumb>")
 
mNo edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
We're still working on this page.
The Page Object is the object that stores a page in the flipbook. 
 
{| class="wikitable"
|-
! scope="col"| Key
! scope="col"| Type
! scope="col"| Description
! scope="col"| Sample value
|-
| acceleration
| Boolean
| The acceleration mode for this page
| true
|-
| cornerSize
| Number
| Width and height in pixels of the each corner
| 100
|-
| next
| Number
| The page will turn to the number of page specified here
| 2
|-
| page
| Number
| The current page number
| 1
|-
| turn
| jQuery Element
| A reference to the current flipbook
| <pre class="javascript">$("#flipbook")</pre>
|-
| z-index
| Number
| The z position of this page
| 10
|}
 
==Example==
 
<pre class="javascript">
$("#flipbook").turn("start", function(event, pageObject, corner) {
 
if (pageObject.page==1) {
pageObject.next = 4;
}
});
</pre>
 
This example will skip the page 2 when turning the page from 1.
 
==See also==
[[Event: start| Event: start]]
<yambe:breadcrumb>API</yambe:breadcrumb>
<yambe:breadcrumb>API</yambe:breadcrumb>

Latest revision as of 17:46, 10 July 2012

The Page Object is the object that stores a page in the flipbook.

Key Type Description Sample value
acceleration Boolean The acceleration mode for this page true
cornerSize Number Width and height in pixels of the each corner 100
next Number The page will turn to the number of page specified here 2
page Number The current page number 1
turn jQuery Element A reference to the current flipbook
$("#flipbook")
z-index Number The z position of this page 10

Example

$("#flipbook").turn("start", function(event, pageObject, corner) {

	if (pageObject.page==1) {
		pageObject.next = 4;
	}
});

This example will skip the page 2 when turning the page from 1.

See also

Event: start <yambe:breadcrumb>API</yambe:breadcrumb>