[英]Resizing of iframe with js stops working when https
我想做的是调整fancybox iframe的大小,我以为我通过调用成功了:
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-反之亦然。 在这种情况下,这可能会有所帮助:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.