Event: start
From Turn.js Documentation
(Difference between revisions)
Line 31: | Line 31: | ||
<pre class="javascript"> | <pre class="javascript"> | ||
$("#flipbook").bind("start", function(event, pageObject, corner) { | $("#flipbook").bind("start", function(event, pageObject, corner) { | ||
− | + | if (corner=="tl" || corner=="tr") { | |
− | + | event.preventDefault(); | |
− | + | } | |
}); | }); | ||
</pre> | </pre> |
Latest revision as of 23:39, 25 November 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(); } });
[edit] Event Sequence