Views
Actions

Event: change

From Turn.js Documentation
(Difference between revisions)
Jump to: navigation, search
(Created page with "{| class="wikitable" |- ! Default action |- | To turn the page |}")
 
Line 1: Line 1:
 +
This event is triggered before changing the current zoom of the flipbook
 +
 +
{| class="wikitable"
 +
|-
 +
! scope="col"| Argument
 +
! scope="col"| Type
 +
! scope="col"| Description
 +
|-
 +
| event
 +
| Object
 +
| Event Object
 +
|}
 +
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
 
! Default action
 
! Default action
 
|-
 
|-
| To turn the page
+
| To change the zoom
 
|}
 
|}
 +
 +
 +
Example:
 +
<pre class="javascript">
 +
$("#zoom-view").bind("zoom.change", function(event, newZoom) {
 +
// Disable the flipbook to zoom out
 +
if (newZoom<=1) {
 +
event.preventDefault();
 +
}
 +
});
 +
</pre>
 +
<yambe:breadcrumb>Zoom Events</yambe:breadcrumb>

Revision as of 15:20, 3 August 2012

This event is triggered before changing the current zoom of the flipbook

Argument Type Description
event Object Event Object
Default action
To change the zoom


Example:

$("#zoom-view").bind("zoom.change", function(event, newZoom) {
	// Disable the flipbook to zoom out
	if (newZoom<=1) {
		event.preventDefault();
	}
});
Main Page > API > Zoom Events > Event: change