iframe jQuery引用问题 [英] iframe jQuery reference problem
问题描述
我的网站中有一个iframe,这个iframe加载了一个带有jquery的页面。似乎jqery使用iframe维度作为参考而不是我的实际文档。
例如,我使用iframe参考:
I have an iframe in my site and this iframe loads a page with jquery. It seems that the jqery is using the iframe dimensions as a reference instead of my actual document. For example, I used an iframe refering to this:
$.jGrowl(title + " has been used");
(jGrowl是一个基本上在页面右上方加载通知的插件)
(jGrowl is a plugin that basically loads a notice on the upper right of the page)
当通知显示时,它显示在iframe的右上角而不是实际文档中。有没有让jquery引用实际网站而不是iframe?
When the notice shows, it is showing on the upper right of the iframe and not the actual document. Is there anyway to get the jquery to refer to the actual site and not the iframe?
推荐答案
document.parent指向你的权利方向
document.parent points you to right direction
$(document.parent).jGlow(title + " has been used");
这篇关于iframe jQuery引用问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!