我正在尝试使用blueimp gallery,我相信我已经根据需要输入了所有代码剪辑,但是当我点击图片时,他们仍然没有使用控件加载。
cat index.html
<!DOCTYPE HTML>
<html lang="en">
<head>
<link rel="stylesheet" href="css/blueimp-gallery.min.css">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-responsive.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<script src="js/blueimp-gallery.min.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/scripts.js"></script>
<script src="js/blueimp-gallery.min.js"></script>
</head>
<body>
<div class="container-fluid">
<div class="row-fluid">
<div class="span12">
<div class="page-header">
<h1>
test <small>test</small>
</h1>
</div>
<div id="blueimp-gallery" class="blueimp-gallery">
<div class="slides"></div>
<h3 class="title"></h3>
<a class="prev">‹</a>
<a class="next">›</a>
<a class="blueimp-gallery-display"></a>
<a class="close">×</a>
<ol class="indicator"></ol>
</div>
<script src="js/init.js"></script>
<div id="links">
<A HREF="images/photo1.jpg"> <IMG HEIGHT=50 WIDTH=50 SRC="images/photo1.jpg"></A>
<A HREF="images/photo2.jpg"> <IMG HEIGHT=50 WIDTH=50 SRC="images/photo2.jpg"></A>
<A HREF="images/photo3.jpg"> <IMG HEIGHT=50 WIDTH=50 SRC="images/photo3.jpg"></A>
<A HREF="images/photo4.jpg"> <IMG HEIGHT=50 WIDTH=50 SRC="images/photo4.jpg"></A>
</div>
</div>
</div>
</div>
</body>
</html>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cat js/init.js
var links = document.getElementById('links').getElementsByTagName('a'),
options = {
// Start an automatic slideshow with a delay of 5 seconds between slides:
interval: 5000,
// Set to true to initialize the Gallery with carousel specific options:
carousel: false
displayClass: 'blueimp-gallery-display',
controlsClass: 'blueimp-gallery-controls',
singleClass: 'blueimp-gallery-single',
leftEdgeClass: 'blueimp-gallery-left',
rightEdgeClass: 'blueimp-gallery-right',
enableKeyboardNavigation: true,
closeOnEscape: true,
},
gallery = blueimp.Gallery(links, options);
之前我曾使用过一些轻型引导程序,这似乎在功能上看起来不一样,或者我只是忽略了一些东西。
答案 0 :(得分:8)
您需要设置课程 blueimp-gallery-controls
<div id="blueimp-gallery" class="blueimp-gallery blueimp-gallery-controls">