0
即時通訊卡真的卡住了..一直坐着這段代碼現在..試圖用ColorBox做一個畫廊,看起來很不錯..我只有一個問題..我只是不能讓它成爲使用iframe後一組...ColorBox iframe rel(group)
http://www.lani.dk/thomas/temp/iframe_problem.zip
網站
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>-</title>
<link media="screen" rel="stylesheet" href="css/colorbox.css" />
<script src="scripts/jquery.min.js"></script>
<script src="scripts/jquery.colorbox.js"></script>
<script>
function showColorBox(imageURL) {
$.fn.colorbox({ opacity: .6, open: true, href: imageURL });
}
</script>
</head>
<body>
<iframe src="iframe.asp" name="iframename" width="400" height="400" frameborder='0' id="iframename">
<p>Your browser does not support iframes.</p>
</iframe>
</body>
</html>
IFRAME
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>-</title>
<style type="text/css">
body {
background-color: #999;
}
</style>
<script src="scripts/jquery.min.js"></script>
<script src="scripts/jquery.colorbox.js"></script>
<script>
$(document).ready(function() {
$('a.colorbox').click(function (event) {
event.preventDefault();
parent.showColorBox($(this).attr("href"));
});
});
</script>
</head>
<body>
<p><a href="images/gallery/pic1.jpg" class="colorbox" rel="group1">pic1</a></p>
<p><a href="images/gallery/pic2.jpg" class="colorbox" rel="group1">pic2</a></p>
<p><a href="images/gallery/pic3.jpg" class="colorbox" rel="group1">pic2</a></p>
</body>
</html>
你可以試試漂亮的照片插件。它類似於你所需要的 – muthu
我可以問一下iframe的用途是什麼..?如果你沒有使用它,你可以做'$('a.gallery')。colorbox({rel:'group1'});' –
它的一個網站,我已經有iframe,完整的背景圖像是慢動作幻燈片 - 所以我打開了所有的圖庫圖像 - http://www.lani.dk/thomas/temp/snapshot.jpg –