创建两个对象 Highslide

Create two object Highslide

我遇到了问题。我同时在 highslide 中创建了两个对象,但其中一个没有激活(我无法关闭或移动他)。下面我写例子:

hs.graphicsDir = 'http://highslide.com/highslide/graphics/';
hs.outlineType = 'rounded-white';

function paint(id){
    
 var element = document.getElementById('highslide-html_' + id);
 var frame = hs.htmlExpand(element, { contentId: 'highslide-html_' + id });
 return frame;
}

paint("id1");
paint("id2");
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script type="text/javascript" src="http://highslide.com/highslide/highslide.js.php?full=true"></script>
<link rel="stylesheet" type="text/css" href="http://highslide.com/highslide/highslide.css" />


<div class="highslide-html-content highslide-move" id="highslide-html_id1">
 <div class="highslide-header">
  <ul>
   <li class="highslide-close">
    <a href="#" onclick="return hs.close(this)">Close</a>
   </li>
  </ul>
 </div>
 <div class="highslide-body">
  Panel 1
 </div>
    <div class="highslide-footer">
        <div>
            <span class="highslide-resize" title="Resize">
                <span></span>
            </span>
        </div>
    </div>
</div>

<div class="highslide-html-content highslide-move" id="highslide-html_id2">
 <div class="highslide-header">
  <ul>
   <li class="highslide-close">
    <a href="#" onclick="return hs.close(this)">Close</a>
   </li>
  </ul>
 </div>
 <div class="highslide-body">
  Panel 2
 </div>
    <div class="highslide-footer">
        <div>
            <span class="highslide-resize" title="Resize">
                <span></span>
            </span>
        </div>
    </div>
</div>

仅当我一次创建两个对象时它不起作用。如果我将 paint(...) 放入 onclick 处理程序中,我可以创建任意数量的对象,并且它们都将是交互式的。

也许有人可以帮助我?

哦,我找到了解决办法。

需要加hs.allowSimultaneousLoading = true;