jquery - 在 Jquery 弹出窗口中显示加载微调器

标签 jquery iframe progress-bar bpopup

我正在使用 jquery 弹出窗口在 Iframe 内加载外部页面。

现在我想显示加载微调器或加载栏图像并在其工作时隐藏外部页面/iframe,因此用户只能看到微调器。

可以吗,如果可以的话,请帮助我。

这是代码

    <script type="text/javascript">
    $(document).ready(function () {

        $("a#em4c").bind("click", function () {
            $("#popup2").bPopup({ content: 'iframe', contentContainer: '#pContent', loadUrl: "http://site.com" });
            return false
        });

    });
</script>

html部分

<p><a id="em4c"><strong>POP ME</strong>: Simple jquery popup that loads a page   inside an iframe</a></div>

谢谢

最佳答案

这可能对你有帮助

<form>
Your input elements 
</form>
<div id="dialog1" title="Waiting" style="display:none">
<img src="/spinning.gif" border="0" align="left" hspace="12"/> Place all your text here   
<iframe id="iframe1" src="" width="100%" height="100%"></iframe>
Place all your Text 
</div>

将其写入 document.ready

$("#dialog1").dialog({
                autoOpen: false,
                height: 150,
                weight: 50,
                resizable: false,   
                modal: true 
            });

//单击元素时您可以这样做

$("a#em4c").bind("click", function () {
        $('#dialog1').removeAttr('style');
        $('#dialog1').dialog('open');
            var url ="some.php";
            $('#iframe1').attr('src',url);
    })

单击该元素后,它将打开旋转图像,然后在以下位置打开 some.php iframe。这是你所期待的吗?

关于jquery - 在 Jquery 弹出窗口中显示加载微调器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6268939/

相关文章:

javascript - 如何在 express.js node.js 中设置 X-Frame-Options

css - 进度停止看起来很糟糕

javascript - Ajax 附加元素不会与 masonry.js 定位的类似元素对齐

javascript - 就像用 jQuery 浏览文件一样

html - 从 iframe 导入 css

jQuery 对话框 + iframe 在 IE9 中给出此错误 : SCRIPT5009: 'Array' is undefined

python - 读取文本文件中行的进度条

vb6 - 处理时显示进度条

javascript - 滚动时旋转图像

javascript - 无法在ajax成功返回时更改图像onChange函数