触摸事件不是用z-index工作在iPad上叠加的div [英] touch event not working with z-index for overlay div on ipad

查看:242
本文介绍了触摸事件不是用z-index工作在iPad上叠加的div的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用视频标签,如果用户暂停视频我采用div显示视频标签的一些选项,在所有的单击事件和z-index的正常工作在桌面上的所有浏览器中显示视频,但一些如何我没有'找不到适用于iPad的任何解决方案,QuickTime播放器和DIV的z-index总是让汽车连我已经以编程方式更改CSS,但在iPad上没有运气

I have displaying video using video tag, if user pause the video I am display some option top of video tag using div, all the click event and z-index work properly on all browser in desktop, but some how I didn't find any solution for iPad that the quicktime player and div z-index always getting auto even I have already change the css programmatically but no luck on iPad

$("#video_screen").bind("pause",function(){
        $("#video_screen").css("z-index","-1");
        $("#videoOptionsDiv").show();
        alert("Seek Time:"+$("video").attr("currentTime")+" ms");
        $("#notif").slideDown("fast");
        alert("video "+$("#video_screen").css("z-index"));
        alert("optionaction "+$("#optionActions").css("z-index"));
 }); 

这是我的code和工作桌面浏览器只

this is my code and work for desktop browser only

推荐答案

我找到了一个解决方案,对于这一点,我刚才删除菜单时出现了视频顶部,因此没有为视频发射触摸事件的控制。他们基于控制,所以如果你只是删除了控制,那么你可以检测的重叠元素的触摸事件设置优先级。

I found one solution for this, I have just remove the control when the menu was appeared top on video so it was not fired touch event for the video. They set the priority based on the control so if you just remove the control then you can detect the touch event for overlapped element.

当你隐藏的选项,只是重新添加

And just add again when you hide the option

这是我们找到的破解

希望这个答案是帮助全给任何人。

hope this answer was help full to anyone

感谢您

这篇关于触摸事件不是用z-index工作在iPad上叠加的div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆