Event: change: Difference between revisions

From Turn.js Documentation
Jump to navigation Jump to search
(Created page with "{| class="wikitable" |- ! Default action |- | To turn the page |}")
 
No edit summary
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 22: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();
	}
});

<yambe:breadcrumb>Zoom Events</yambe:breadcrumb>