Views
Actions

Event: end

From Turn.js Documentation
(Difference between revisions)
Jump to: navigation, search
 
(2 intermediate revisions by one user not shown)
Line 10: Line 10:
 
| Object
 
| Object
 
| Event Object
 
| Event Object
|-
 
| page
 
| Number
 
| The number of the page
 
 
|-
 
|-
 
| pageObject
 
| pageObject
 
| Object
 
| Object
 
| [[Page Object|The page object]]
 
| [[Page Object|The page object]]
 +
|-
 +
| pageTurned
 +
| Boolean
 +
| True if the page was turned
 
|}
 
|}
  
Line 23: Line 23:
 
<pre class="javascript">
 
<pre class="javascript">
  
$("#flipbook").bind("end", function(event, page, pageObject){
+
$("#flipbook").bind("end", function(event, pageObject, turned){
alert("turn.end:" +page);
+
  alert("turn.end:" +pageObject.page);
 
});
 
});
 
</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>

Latest revision as of 23:39, 25 November 2012

This event is triggered when the transition of a page stops.

Argument Type Description
event Object Event Object
pageObject Object The page object
pageTurned Boolean True if the page was turned

Example:


$("#flipbook").bind("end", function(event, pageObject, turned){
  alert("turn.end:" +pageObject.page);
});

[edit] Event Sequence

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