0

如何在 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 一直在旋转加载器,但没有打开窗口?

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

谢谢!

4

1 回答 1

0

请参阅此示例: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>
于 2013-11-12T12:27:40.960 回答