我正在使用JQuery Mobile和Phonegap构建iPhone应用程序。如何启用捏合和缩放手势?
我试过这个:
$(document).bind('mobileinit', function(){
alert('mobileinit2');
$.mobile.metaViewportContent = 'width=device-width, minimum-scale=1, maximum-scale=2, user-scalable=yes';
$.extend($.mobile.zoom, {locked:false,enabled:true});
alert('/mobileinit');
});
但它对我不起作用。
谢谢
答案 0 :(得分:1)
答案 1 :(得分:0)
尝试这样的事情:
var con=document.getElementById('containerId');
con.addEventListener('gesturechange',function(e){
if(e.scale>1)
{
//zoom in
}
else if(e.scale<1)
{
//zoom out
}
});