您的位置:首页 > 移动开发 > 微信开发

微信长按出现菜单栏js代码

2016-02-29 18:23 141 查看
ios:

-webkit-user-select:none;
-ms-user-select: none;
-moz-user-select: none;
user-select: none;
-webkit-touch-callout:none;
-ms-touch-callout:none;
-mozt-touch-callout:none;
touch-callout:none;

安卓:

<div class="main3">touch事件</div>

$(function(){
$('.main3').bind('touchstart', function(e) {
if (e && e.preventDefault) {
e.preventDefault();
} else {
window.event.returnValue = false;
}
return false;
});
$('.main3').bind('touchmove', function(e) {
if (e && e.preventDefault) {
e.preventDefault();
} else {
window.event.returnValue = false;
}
return false;
});

$('.main3').bind('touchend', function(e) {
if (e && e.preventDefault) {
e.preventDefault();
} else {
window.event.returnValue = false;
}

})

})
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: