0

jquery プラグイン Colorbox を実装しようとしています。colorbox を使用して、別の HTML ページを colorbox ウィンドウで開きたいと思います。しかし、それは機能していません。コードは次のとおりです。

<script type="text/javascript" src="jquery.colorbox.js"></script>
<script>


$("#text1").colorbox({href:"hello.html" width:500, height:500});        

</script>

そして、これが HTML コードです。

<div id='container'>
<div id="sign1" class="sign" style="background-image:url('images/log.jpg'); position:absolute; width:1440px; height:25px;">
</div>
<div id='text11' class='text'><font color='white'><a id='text1' href="hello.html"> Sign Up </div></font>
</div>

カラーボックス ウィンドウで hello.html を開くにはどうすればよいですか?

4

1 に答える 1

0

解決策を得ました.iframeは使用する必要がある属性です.

$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
于 2013-09-14T12:32:01.773 に答える