使用jQuery捕获事件 [英] event capturing with jQuery

查看:83
本文介绍了使用jQuery捕获事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

jQuery使用事件冒泡,但有没有办法进行事件捕获,即按照解释的降序排列这里

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

具体情况如下:主持人A&主机B位于同一个域中,例如:
www.mydomain.com xxx.mydomain.com
当然,同源策略使得无法在iframe中触发事件。但是我想知道用户是否点击 $('#hostA')并将事件传递给< iframe>

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>

推荐答案

不,jQuery不支持这个,它永远不会 - IE无法实现捕获事件。

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

这篇关于使用jQuery捕获事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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