您的位置:首页 > Web前端 > HTML

手机html长按禁止系统事件,自己更改后

2016-09-19 08:58 155 查看
$('#NoticeInfo .noticerow').each(function (event) {                        

                        var timeout;

                        //鼠标按下 或 手指触摸屏幕时触发

                        $(this).bind('touchstart mousedown', function (event) {

                            event.stopPropagation();

                            event.preventDefault();

                            $(this).addClass('bghover');

                            timeout = setTimeout(function () {                                 

                                $('#editDiv').show(); $('#newDiv').show();

                            }, 1000);                            

                        });

                        //鼠标松开 或 手指从屏幕上离开时触发

                        $(this).bind('touchend mouseup', function (event) {                            

                            clearTimeout(timeout);

                            $(this).removeClass('bghover');                            

                        });

                        //鼠标移出、手指停止触摸屏幕时触发

                        $(this).bind('touchcancel mouseout', function (event) {                            

                            clearTimeout(timeout);

                            $(this).removeClass('bghover');                            

                        });

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