【发布时间】:2011-05-29 09:55:39
【问题描述】:
我正在使用 JQ Colorbox 插件(一种 Lightbox),我想将一个类添加到通过 Colorbox 的 iframe 函数加载的文档的正文中。
基本上,我试图:
$("iframe").contents().find('body').addClass('foo');
但这似乎不起作用,可能是因为我的 iframe 是在用户调用 Colorbox 之后才生成的?
有没有办法达到这样的效果?
非常感谢。
【问题讨论】:
标签: javascript jquery iframe colorbox