2016-08-30 87 views
1

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

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

 
function paint(id){ 
 
    \t 
 
\t var element = document.getElementById('highslide-html_' + id); 
 
\t var frame = hs.htmlExpand(element, { contentId: 'highslide-html_' + id }); 
 
\t 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"> 
 
\t <div class="highslide-header"> 
 
\t \t <ul> 
 
\t \t \t <li class="highslide-close"> 
 
\t \t \t \t <a href="#" onclick="return hs.close(this)">Close</a> 
 
\t \t \t </li> 
 
\t \t </ul> 
 
\t </div> 
 
\t <div class="highslide-body"> 
 
\t \t Panel 1 
 
\t </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"> 
 
\t <div class="highslide-header"> 
 
\t \t <ul> 
 
\t \t \t <li class="highslide-close"> 
 
\t \t \t \t <a href="#" onclick="return hs.close(this)">Close</a> 
 
\t \t \t </li> 
 
\t \t </ul> 
 
\t </div> 
 
\t <div class="highslide-body"> 
 
\t \t Panel 2 
 
\t </div> 
 
    <div class="highslide-footer"> 
 
     <div> 
 
      <span class="highslide-resize" title="Resize"> 
 
       <span></span> 
 
      </span> 
 
     </div> 
 
    </div> 
 
</div>

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

也许有人可以帮助我吗?

回答

1

哦,我找到了一个解决方案。

必要添加hs.allowSimultaneousLoading = true;