【发布时间】:2025-11-22 23:50:01
【问题描述】:
(横向滑动)
(灯箱)
这是我的标题:
<script type="text/javascript" src="<?php echo ROOT.'sources/js/jquery.js'; ?>"></script>
<script type="text/javascript" src="<?php echo ROOT.'sources/js/contentSlider/jquery.cross-slide.js'; ?>"></script>
<link rel="stylesheet" href="<?php echo ROOT.'sources/css/lightbox.css'; ?>" type="text/css" media="screen" />
<script type="text/javascript" src="<?php echo ROOT.'sources/js/lightbox/prototype.js'; ?>"></script>
<script type="text/javascript" src="<?php echo ROOT.'sources/js/lightbox/scriptaculous.js?load=effects,builder'; ?>"></script>
<script type="text/javascript" src="<?php echo ROOT.'sources/js/lightbox/lightbox.js'; ?>"></script>
这是我的身体:
<script type="text/javascript">
$(function() {
$('#imgHold').crossSlide({
sleep: 3,
fade: .5
}, [
{ src: 'images/featured/ftcont_img1.png' },
{ src: 'images/featured/ftcont_img2.png' },
{ src: 'images/featured/ftcont_img3.png' },
{ src: 'images/featured/ftcont_img4.png' }
]);
});
</script>
<div id="ftIMG"><div id="imgHold">Loading...</div></div>
我没有使用此页面上的灯箱脚本的任何内容。但我希望将脚本保留在标题中,所以在 PHP 中我只需要调用 1 个标题。 LightBox“手册”说要添加“initLightbox();到body标签上的onload属性,所以我这样做了,没有任何改变。现在我还在其他地方读到了一个(jQuery.no-conflict),我想知道这是否将是继续的方式。或者是否有其他方法可以解决此问题。
另外,如果我想在同一页面上使用 (ThickBox3.1) 与其他所有内容。有可能吗,具体怎么做?
另外,很抱歉没有将它们作为链接发布,显然新用户不允许发布超过 1 个链接。
【问题讨论】:
-
jQuery,原型和脚本?哎呀!
标签: javascript jquery thickbox lightbox2