Chrome / Safari(webkit)中的JQuery Overlay无法进行更改

在谷歌花了几天试图找到答案后,我转向那些我应该开始的人。 我已经安装并使用Overlay取得了巨大的成功。 问题是能够对覆盖视图进行jQuery更改。 它在IE和FF中完美运行,但在Chrome或Safari(webkit)中无效。 我意识到webkit中内置了安全保护,但视图与网站的其他部分位于同一服务器上。 我做错了什么? 有没有关于绕过这些证券的提示? 任何提示都会有帮助。 如果您已成功完成此操作,请提供示例代码。 如果可能的话,我今天需要完成这项工作。 此示例是正在使用的代码的摘录。 谢谢你,拉尔夫

var triggers = jQuery("input[rel]").overlay({ mask: { color: '#ebecff', loadSpeed: 200, opacity: 0.9 }, effect: 'apple', onBeforeLoad: function() { // grab wrapper element inside content var wrap = this.getOverlay().find(".contentWrap"); var link = "index.php?page=account.billing&option=com_virtuemart"; //Add the link and style attributes to the basic iframe //jQuery(theframe).attr({ src: link, style: 'height:650px; width:760px; border:none;' }); jQuery(theframe).attr({ src: link, style: 'height:700px; width:840px; border:none;' }); //Write the iframe into the wrap wrap.html(theframe); }, onLoad: function(){ var inFrame = this.getOverlay().find("#innerFrame"); jQuery(inFrame).contents().find('form').attr('onsubmit','window.parent.CloseOverlayFromIframe();'); } }); 

使用外部样式表时,不要对document.ready()事件使用Apple效果,以防止在Safari 3+和Chrome(基于WebKit的浏览器)中出现不可预测的行为。 当你删除effect: 'apple',时,你会看到它在safari和chrome中effect: 'apple',

该网站建议两种方法来解决苹果效应:

  • 请改用$(window).load()。 这肯定会在加载样式表后执行。
  • 直接在页面上定义叠加样式或为元素内联。

在页面的末尾。