簡體   English   中英

使用Lightbox Jquery插件

[英]Working with Lightbox Jquery plugin

我設計了一個網頁,在左側有一個div元素,在中央有iframe,在右側有另一個iframe。

1.在中心iframe中,單擊這些圖像會加載縮略圖圖像,從而調用lightbox插件,並且必須在整個文檔上顯示較大的圖像(背景模糊)。

2.我面臨的問題是,燈箱插件正在內部iframe中而不是在整個文檔中加載(就像在許多社交網站中一樣)。

3.我已經從互聯網上下載了燈箱插件,並在我的網頁上使用了它

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 &amp; 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>

謝謝。

我已經在這里解決了所面臨的問題

http://www.dynamicdrive.com/forums/archive/index.php/t-19051.html

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM