Views
Actions

Option: when

From Turn.js Documentation
(Difference between revisions)
Jump to: navigation, search
 
Line 13: Line 13:
 
<pre class="javascript">
 
<pre class="javascript">
 
$("#flipbook").turn({when: {
 
$("#flipbook").turn({when: {
turning: function(event, page, pageObject) {
+
turning: function(event, page, pageObject) {
// Implementation
+
// Implementation
}
+
 
}
 
}
 +
}
 
});
 
});
 
</pre>
 
</pre>
  
 
<yambe:breadcrumb>Turn Options</yambe:breadcrumb>
 
<yambe:breadcrumb>Turn Options</yambe:breadcrumb>

Latest revision as of 17:02, 8 July 2012

Sets event listeners. The keys must be listed on the list of events.

Type Default value
Object Empty object

For example:

$("#flipbook").turn({when: {
	turning: function(event, page, pageObject) {
		// Implementation
	}
}
});
Main Page > API > Turn Options > Option: when