Views
Actions

Event: start

From Turn.js Documentation
(Difference between revisions)
Jump to: navigation, search
Line 22: Line 22:
 
| colspan="2"| To turn the page
 
| colspan="2"| To turn the 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|corners]] <tt>tl</tt> and <tt>tr</tt>:
 
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|corners]] <tt>tl</tt> and <tt>tr</tt>:

Revision as of 20:14, 6 July 2012

This event is triggered when an animation of a page starts.

Argument Type Description
event Object Event Object
page Number The page number
corner Number Corner type
Default action To turn the 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();
	}
});
Main Page > API > Turn Events > Event: start