Views
Actions

Event: start

From Turn.js Documentation
(Difference between revisions)
Jump to: navigation, search
Line 37: Line 37:
 
</pre>
 
</pre>
 
== Event Sequence ==
 
== Event Sequence ==
# [[Event: start| Start]] ''(Only from a mouse action)''
+
# [[Event: start| Start]]
 
# [[Event: turning| Turning]]
 
# [[Event: turning| Turning]]
 
# [[Event: turned| Turned]]
 
# [[Event: turned| Turned]]
# [[Event: end| End]] ''(Only from a mouse action)''
+
# [[Event: end| End]]
 
<yambe:breadcrumb>Turn Events</yambe:breadcrumb>
 
<yambe:breadcrumb>Turn Events</yambe:breadcrumb>

Revision as of 20:59, 6 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
page Number The page number
corner Number Corner type
Default action
To show the folded page

For example, if you want to only allow the corner at the bottom of the page, you can use the start event and prevent its default action for the corners tl and tr:

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

Event Sequence

  1. Start
  2. Turning
  3. Turned
  4. End
Main Page > API > Turn Events > Event: start