灯箱崩溃了
我有几个由模板制作的页面,该模板具有使用 idTabs 在 javascript 中制作的导航。
这就是我在 中的内容:
<script type="text/javascript" src="jquery.idTabs.min.js"></script>
<script src="scripts/jquery.js" type="text/javascript"></script>
<script src="scripts/lightbox.js" type="text/javascript"></script>
<link href="css/lightbox.css" rel="stylesheet" type="text/css" />
<link href="css/sample_lightbox_layout.css" rel="stylesheet" type="text/css" />
然后在 中:
<div id="poze">
<div id="gallery" class="lbGallery">
<ul>
<li> <a href="images/lightboxdemo2.jpg" title=""><img src="images/lightboxdemo_thumb2.jpg" width="72" height="72" alt="Flower" /></a> </li>
<li> <a href="images/lightboxdemo5.jpg" title=""><img src="images/lightboxdemo_thumb5.jpg" width="72" height="72" alt="Tree" /></a> </li>
</ul>
</div>
<script type="text/javascript">
// BeginOAWidget_Instance_2127022: #gallery
$(function(){
$('#gallery a').lightBox({
imageLoading: '/images/lightbox/lightbox-ico-loading.gif', // (string) Path and the name of the loading icon
imageBtnPrev: '/images/lightbox/lightbox-btn-prev.gif', // (string) Path and the name of the prev button image
imageBtnNext: '/images/lightbox/lightbox-btn-next.gif', // (string) Path and the name of the next button image
imageBtnClose: '/images/lightbox/lightbox-btn-close.gif', // (string) Path and the name of the close btn
imageBlank: '/images/lightbox/lightbox-blank.gif', // (string) Path and the name of a blank image (one pixel)
fixedNavigation: false, // (boolean) Boolean that informs if the navigation (next and prev button) will be fixed or not in the interface.
containerResizeSpeed: 400, // Specify the resize duration of container image. These number are miliseconds. 400 is default.
overlayBgColor: "#999999", // (string) Background color to overlay; inform a hexadecimal value like: #RRGGBB. Where RR, GG, and BB are the hexadecimal values for the red, green, and blue values of the color.
overlayOpacity: .6, // (integer) Opacity value to overlay; inform: 0.X. Where X are number from 0 to 9
txtImage: 'Image', //Default text of image
txtOf: 'of'
});
});
// EndOAWidget_Instance_2127022
</script>
</div>
导航有两个链接:一个
带有文本,以及带有灯箱画廊的
。 灯箱是 Dreamweaver 中的一个小部件。<div id="navidtabs">
<ul class="idTabs">
<li><a href="#info">informatii</a></li>
<li><a href="#pictures">poze</a></li>
</ul>
</div>
令人难以置信的事情发生了:我将模板应用到新页面,进行修改,保存它,将其加载到 wamp 服务器中,在导航链接之间切换,测试灯箱,它起作用了! 但是,当我切换到另一个页面并返回时,灯箱崩溃了。 我可以看到图片,但是当我单击时,它会打开另一个仅显示图片的页面。
我忘了说我有第三个
连接到导航中,这是一个从数据库检索数据的选择命令。 整个文件是PHP。我该怎么做才能保持灯箱效果?
I have several pages made from the a template that has a navigation made with idTabs, in javascript.
This is what I have in <head>
:
<script type="text/javascript" src="jquery.idTabs.min.js"></script>
<script src="scripts/jquery.js" type="text/javascript"></script>
<script src="scripts/lightbox.js" type="text/javascript"></script>
<link href="css/lightbox.css" rel="stylesheet" type="text/css" />
<link href="css/sample_lightbox_layout.css" rel="stylesheet" type="text/css" />
Then in <body>
:
<div id="poze">
<div id="gallery" class="lbGallery">
<ul>
<li> <a href="images/lightboxdemo2.jpg" title=""><img src="images/lightboxdemo_thumb2.jpg" width="72" height="72" alt="Flower" /></a> </li>
<li> <a href="images/lightboxdemo5.jpg" title=""><img src="images/lightboxdemo_thumb5.jpg" width="72" height="72" alt="Tree" /></a> </li>
</ul>
</div>
<script type="text/javascript">
// BeginOAWidget_Instance_2127022: #gallery
$(function(){
$('#gallery a').lightBox({
imageLoading: '/images/lightbox/lightbox-ico-loading.gif', // (string) Path and the name of the loading icon
imageBtnPrev: '/images/lightbox/lightbox-btn-prev.gif', // (string) Path and the name of the prev button image
imageBtnNext: '/images/lightbox/lightbox-btn-next.gif', // (string) Path and the name of the next button image
imageBtnClose: '/images/lightbox/lightbox-btn-close.gif', // (string) Path and the name of the close btn
imageBlank: '/images/lightbox/lightbox-blank.gif', // (string) Path and the name of a blank image (one pixel)
fixedNavigation: false, // (boolean) Boolean that informs if the navigation (next and prev button) will be fixed or not in the interface.
containerResizeSpeed: 400, // Specify the resize duration of container image. These number are miliseconds. 400 is default.
overlayBgColor: "#999999", // (string) Background color to overlay; inform a hexadecimal value like: #RRGGBB. Where RR, GG, and BB are the hexadecimal values for the red, green, and blue values of the color.
overlayOpacity: .6, // (integer) Opacity value to overlay; inform: 0.X. Where X are number from 0 to 9
txtImage: 'Image', //Default text of image
txtOf: 'of'
});
});
// EndOAWidget_Instance_2127022
</script>
</div>
The navigation has two links: a <div>
with text, and a <div>
with lightbox gallery.
The lightbox is a widget from Dreamweaver.
<div id="navidtabs">
<ul class="idTabs">
<li><a href="#info">informatii</a></li>
<li><a href="#pictures">poze</a></li>
</ul>
</div>
Something unbelievable happens: I apply the template to a new page, make the modifications, save it, load it into the wamp server, switch between the navigation links, test the lightbox, it works!
But when I switch for example, to a different page, and return, the lightbox crashes.
I can see the pictures, but when I click it opens another page just for the picture.
I forgot to say that I have a third <div>
conected into the navigation, a select command to retrieve data from database.
The entire file is PHP.
What can I do to mantain the lightbox effect?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论