繁体   English   中英

如何在Highslide中加载动态生成的iframe

[英]How to load dynamically generated iframe in Highslide

如何在Highslide中加载动态生成的iframe? html部分:

<div id="fr">Get iframe</div>
<div id="test999">This is a test</div>
<p><iframe id="ifr"></iframe></p>

jQuery部分:

$(function () {
    $("#fr").click(function() {
    $('iframe').contents().find('body').html($('#test999').html());
    return hs.htmlExpand(this,{ contentId: 'ifr',objectType: 'iframe' } );
});

点击“获取iframe”时,Highslide会继续旋转加载程序,但不会打开窗口吗?

我怎样才能解决这个问题?

谢谢!

请参见以下示例: http : //www.roadrash.no/hs-support/example-iframe-with-controlbar.html

因此,适当的结构:

<a href="include-short.htm" onclick="return hs.htmlExpand(this, { objectType: 'iframe', contentId: 'controlbar5' } )">
    Content in iframe
</a>

<div class="highslide-html-content" id="controlbar5"> </div>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM