event capturing with jQuery

我是研究僧i 提交于 2019-12-18 08:47:28

问题


jQuery uses event bubbling, but is there a way to do event capturing ie in the descending order as explained here

The specific case is the following where host A & host B are on the same domain like : www.mydomain.com and xxx.mydomain.com. Of course the Same Origin Policy makes it that it is not possible to trigger on event in the iframe. However I just would like to know if user has clicked on $('#hostA') and pass on the event to the <iframe>.

<div id="hostA"> <iframe id="hostB"> </div>


回答1:


No, jQuery does not support this and it never can -- IE has no way to implement a capturing event.



来源:https://stackoverflow.com/questions/6354079/event-capturing-with-jquery

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!