Javascript 使用js调整iframe的大小在https时停止工作
我想做的是调整fancybox iframe的大小,我想我成功地调用了:Javascript 使用js调整iframe的大小在https时停止工作,javascript,jquery,https,Javascript,Jquery,Https,我想做的是调整fancybox iframe的大小,我想我成功地调用了: parent.jQuery('#fancybox-inner').css({'height': '450px'}); parent.jQuery('#fancybox-wrap').css({'height': '550px'}); 但是,当我把它部署到我的工作在https中的阶段区域时,这个解决方案不起作用,我想这与https部分有关。我试着用谷歌搜索这个,但没有找到任何合适的解决方案。请帮我记住我是JS新手 代码:
parent.jQuery('#fancybox-inner').css({'height': '450px'});
parent.jQuery('#fancybox-wrap').css({'height': '550px'});
但是,当我把它部署到我的工作在https中的阶段区域时,这个解决方案不起作用,我想这与https部分有关。我试着用谷歌搜索这个,但没有找到任何合适的解决方案。请帮我记住我是JS新手
代码:
jQuery().ready(function() {
jQuery('#no_user').click(function () {
if (jQuery(".temp_expand").css("display") == "none") {
jQuery(".temp_expand").slideDown();
parent.jQuery('#fancybox-inner').css({'height': '450px'});
parent.jQuery('#fancybox-wrap').css({'height': '550px'});
}
else {
jQuery(".temp_expand").slideUp();
jQuery(".temp_expand").css("display", "none");
parent.jQuery('#fancybox-inner').css({'height': '850px'});
parent.jQuery('#fancybox-wrap').css({'height': '950px'});
}
}).toggle(function() {
jQuery('#temp_no_user').text("#{messages['login']}");
}, function() {
jQuery('#temp_no_user').text("#{messages['register']}");
});
});
编辑开始
我收到一个JS错误:
Error: Permission denied to access property 'jQuery'
Source File: https://stage.temp.se/login/login
Line: 185
编辑结束听起来像是将页面作为https和帧源http,反之亦然。如果是这样的话,这可能会有所帮助: