我在javascript中使用带有idTabs导航的模板制作了几个页面。
这就是我在<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" />
然后在<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>
导航有两个链接:<div>
包含文字,<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服务器,在导航链接之间切换,测试灯箱,它的工作原理! 但是当我切换到一个不同的页面并返回时,灯箱会崩溃。 我可以看到图片,但是当我点击它时会打开另一页只是为了图片。
我忘了说我有第三个<div>
连接到导航,一个select命令从数据库中检索数据。
整个文件是PHP。
我可以做些什么来保持灯箱效果?