jquery mobile 提供了一个 doubletap 选项,但是,当我使用 Ipad 进行测试时,它只会执行缩放页面的默认行为,有什么办法可以解决吗?谢谢
$("#book div img").live('doubletap', function() {
$("#book").turn("disable", true);
var path = this.src;
path = path.replace("medium", "original");
var imgPath = path.replace("medium", "image");
path = path.replace("jpg", "png");
var textPath = path.replace("medium", "text");
//$("body").prepend("<div id = 'view'><div id = 'popup'><img id = 'largeText' src = '' /><img id = 'largeImg' src = '' /></div></div><img id = 'close' src = 'img/close.png' /><div id='slider' style='display:none;position:fixed;z-index:105;height:25%;right: 2%;top:25%;'></div>");
$("body").prepend("<div id = 'view'><div id = 'popup'><img id = 'largeText' src = '' /><img id = 'largeImg' src = '' /></div></div><img id = 'close' src = 'img/close.png' /><img id = '1x' src ='img/1x.png' class = 'icon' style='top:280px;'><img id = '2x' src ='img/2x.png' class = 'icon' style='top:340px;'><img id = '4x' src ='img/4x.png' class = 'icon' style='top:400px;'></div>");
//$(".nav_arrow").css("visibility","hidden");
$("footer").css("visibility","hidden");
$("#largeText").attr("src",textPath);
$("#largeImg").attr("src",imgPath);
$("#view").css("height",$(window).height());
$("#view").css("width",$(window).width());
$("#popup").css("height",$("#largeImg").height());
$("#popup").css("width",$("#largeImg").width());
element = $('#view').viewport();
content = element.viewport('content');
content.draggable({
containment: 'parent'
});
content.scraggable({
containment: 'parent',
sensitivity:'40'
});
$( "#view" ).show();
$( "#popup" ).show();
$( "#close" ).delay(500).show(0);
$( ".icon" ).delay(500).show(0);
$( ".icon" ).fadeTo("slow", 0.43);
});