简体   繁体   English

如何在重叠的div中组织重叠的javascript onclick事件

[英]How to organize overlapping javascript onclick events in overlapping divs

Especially on smaller screens like iPad and iPhone it happens that a click on a element does not only trigger the "onclick function of the actual script but also the "onclick" function of the javascript of the underlaying div. 尤其是在较小的屏幕(如iPad和iPhone)上,点击某个元素不仅会触发实际脚本的“ onclick”功能,还会触发底层div的javascript的“ onclick”功能。

On my homepage http://www.somersetsights.co.za/en/index.html for example on a iPad a click on the like button activates the FB Like dialog and a click on the OK button of this Like dialog triggers the start of a movie from the slideshow function underneeth the Like dialog. 在我的主页http://www.somersetsights.co.za/en/index.html上 ,例如在iPad上,单击“赞”按钮将激活“ FB赞”对话框,然后单击“赞”对话框的“确定”按钮将触发启动。 “幻灯片”功能中的电影片段在“喜欢”对话框下面。

I tried to find a solution by googling this problem but struggled to find something. 我试图通过谷歌搜索这个问题来找到解决方案,但是努力寻找一些东西。 I am not a beginner but I am also not a experianced javascript programmer. 我不是初学者,但是我也不是经验丰富的javascript程序员。 Help would be very much appreciated. 帮助将不胜感激。

Peter 彼得

也许可以帮到您: http : //www.quirksmode.org/js/events_order.html告诉我们您使用的是jQuery还是其他JS库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM