jQuery弹出(bPopup)加载iFrame失败
jQuery popup (bPopup) fails to load iFrame
我使用jQuery插件创建了一个加载.php站点的弹出窗口:bpopup.
问题是插件不会加载在php编码的网站。谁能告诉我哪里出了问题?
这是我正在使用的代码:
JavaScript:$('#leader').bind('click', function (e) {
// Prevents the default action to be triggered.
e.preventDefault();
// Triggering bPopup when click event is fired
$('#leaderboard').bPopup({
modalClose: false,
opacity: '0',
positionStyle: 'fixed', //'fixed' or 'absolute'
content: 'iframe', //'ajax', 'iframe' or 'image'
contentContainer: '.content',
loadUrl: 'http://remake.hr/memtest/leaderboard.php' //Uses jQuery.load()
});
});
HTML: <div id="leaderboard" class="info"></div>
<div class="button" id="leader"></div>
CSS: .info {
display:none;
width:700px;
background: rgb(38, 170, 225);
/* Fall-back for browsers that don't support rgba */
background: rgba(38, 170, 225, .9);
color:white;
line-height: 35px;
padding: 25px 50px 50px 25px;
}
使用class="content"
为HTML添加内部div标签
对于contentContainer: '.content'
,您指定该容器。
生成的HTML:
<div id="leaderboard" class="info"><div class="content"></div></div>
<div class="button" id="leader"></div>
相关文章:
- 使用php脚本验证访问者的年龄,并在不刷新的情况下根据结果加载iframe
- 使用Javascript(或jQuery)加载iframe内容
- Internet Explorer重新加载IFrame
- Fine Uploader-未收到来自已加载iframe的有效消息
- 使用本地生成的代码通过 JavaScript 加载 IFrame
- 加载iframe时激发的事件
- 动态渲染 .mht 文件,无需加载/iframe/嵌入
- 如何在选择列表项时重新加载iframe
- 如何使用JavaScript在iframe中重新加载iframe
- 在featherlight.js中延迟加载iFrame
- 实时在更改时重新加载iframe脚本
- 如何在不闪烁的情况下加载Iframe
- 如何按时间间隔重新加载Iframe内容,使其不会闪烁
- 设置 URL 以在 Django 模板中加载 iframe
- 在离开页面之前加载 iframe
- 加载 Iframe src,并从水平下拉菜单中进行选择
- 同时加载 iframe 并重置文档位置
- 单击按钮时重新加载 iframe 内容(本地 HTML)
- 单击元素时重新加载 iframe src
- 在可见时加载 iframe