Views
Actions

Event: start

From Turn.js Documentation
(Difference between revisions)
Jump to: navigation, search
m
Line 11: Line 11:
 
| Event Object
 
| Event Object
 
|-
 
|-
| [[Page object|pageObject]]
+
| pageObject
 
| Object
 
| Object
| The page object
+
| [[Page object|The page object]]
 
|-
 
|-
 
| corner
 
| corner
Line 30: Line 30:
  
 
<pre class="javascript">
 
<pre class="javascript">
$("#flipbook").bind("start", function(event, page, corner) {
+
$("#flipbook").bind("start", function(event, pageObject, corner) {
 
if (corner=="tl" || corner=="tr") {
 
if (corner=="tl" || corner=="tr") {
 
event.preventDefault();
 
event.preventDefault();

Revision as of 10:15, 10 July 2012

This event is triggered when an animation of a page starts. In other words, before showing a folded page.

Argument Type Description
event Object Event Object
pageObject Object The page object
corner Number Corner type
Default action
To show the folded page

For example, if you want to prevent the animation to start when using the corners tl and tr, you can use the start event and prevent its default action:

$("#flipbook").bind("start", function(event, pageObject, corner) {
	if (corner=="tl" || corner=="tr") {
		event.preventDefault();
	}
});

Event Sequence

  1. Start
  2. Turning
  3. Turned
  4. End


See also

Corners

Main Page > API > Turn Events > Event: start