Views
Actions

Event: doubleTap

From Turn.js Documentation
(Difference between revisions)
Jump to: navigation, search
 
Line 16: Line 16:
 
$("#zoom-view").bind("zoom.doubleTap", function(event) {
 
$("#zoom-view").bind("zoom.doubleTap", function(event) {
 
if ($(this).zoom("value")==1) {
 
if ($(this).zoom("value")==1) {
$(".magazine").
 
removeClass("animated").
 
addClass("zoom-in");
 
 
$(this).zoom("zoomIn", event);
 
$(this).zoom("zoomIn", event);
 
} else {
 
} else {

Latest revision as of 20:29, 16 July 2012

This event is triggered when a double tap or double click happens on the viewport element.

Argument Type Description
event Object Event Object

Example:

$("#zoom-view").bind("zoom.doubleTap", function(event) {
	if ($(this).zoom("value")==1) {
		$(this).zoom("zoomIn", event);
	} else {
		$(this).zoom("zoomOut");
	}
});
Main Page > API > Zoom Events > Event: doubleTap