如何在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会继续旋转加载器,但不会打开窗口?
我该如何解决这个问题呢?
谢谢!
发布于 2013-11-12 20:27:41
请参阅此示例: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>https://stackoverflow.com/questions/19900706
复制相似问题