我正在尝试使用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);
我以前用过一些轻引导,这似乎在功能上不一样,或者我只是忽略了一些东西。
最佳答案
你需要设置类blueimp库控件
<div id="blueimp-gallery" class="blueimp-gallery blueimp-gallery-controls">
关于jquery - Blueimp Gallery集成问题,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/17439085/