我设计了一个网页,左边是div元素,中间是iframe,右边是另一个iframe。
1.在中心iframe中,我加载缩略图,单击这些图像,lightbox插件将被调用,并且必须在整个文档上显示较大的图像(背景模糊)。
2.我面临的问题是lightbox插件在中心iframe中加载,而不是在整个文档中加载(就像在许多社交网站中一样)。
3.我已经从互联网上下载了lightbox插件,并在我的网页上使用它
4.我希望图像能够在lightbox的帮助下显示在整个文档中。
非常感谢您的任何帮助。
下面是我编写的代码片段
<!--this code is written in home page-->
<div>
<ul>
<li><a href="http://localhost/php/image.php?category=sea" target="description" class="underline">SEA</a></li>
<li><a href="http://localhost/php/image.php?category=ANIMALS" target="description" class="underline">ANIMALS & BIRDS</a></li>
<li><a href="http://localhost/php/image.php?category=plants" target="description" class="underline">plants</a></li>
<li><a href="http://localhost/php/image.php?category=Tourism" target="description" class="underline">Tourism</a></li>
<ul>
</div>
<filedset><iframe name="description" width="725px" height="800px" align="left" frameborder="0" id="description"></iframe></fieldset>
<fieldset>
<iframe name="info" width="300px" height="380px" frameborder="0" src="UserInformation.php" id="iframeid"><!--logged in user's information-->
</iframe>
</fieldset>
<!--this code is written in image.php file-->
<head>
//calling JQUERY LIGHT BOX PLUGIN HERE ON clicking an image displayed in this page(within iframe name="description")
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src="../js/jquery.lightbox-0.5.js"></script>
<link rel="stylesheet" type="text/css" href="../css/jquery.lightbox-0.5.css" media="screen" />
<script type="text/javascript">
$(function() {
$('#gallery a').lightBox();
});
</script>
</head>谢谢。
发布于 2012-05-03 17:05:04
我已经得到了我所面临问题的解决方案,在这里
http://www.dynamicdrive.com/forums/archive/index.php/t-19051.html
https://stackoverflow.com/questions/10303468
复制相似问题