【发布时间】:2013-03-04 09:56:56
【问题描述】:
uu我正在尝试检测 iframe 内的点击事件。我已经在 SO 上找到了一些(不工作的)解决方案,但我无法修复它们并让它们在我的代码上工作。
如何在 iframe 内检测点击事件的目标?
由于 PrettyPhoto 只是由
加载$("a[rel^='prettyPhoto']").prettyPhoto();
我希望有一个类似于
的解决方案$("a[rel^='prettyPhoto']").prettyPhoto(
$('#myframe').bind('click', function(event) {
alert("cliked");
})
);
但这不起作用。有什么想法吗?
【问题讨论】:
标签: jquery iframe onclick frame prettyphoto