twitter-bootstrap Blueimp Gallery 集成问题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17439085/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Blueimp Gallery integration issue
提问by Chris
I am attempting to use the blueimp galleryand I believe I have entered the all of the code snips as needed but still when I click on an image they do not load with the contols.
我正在尝试使用blueimp 库,我相信我已经根据需要输入了所有代码片段,但是当我单击图像时,它们仍然没有加载控件。
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);
I have used some light bootstrap before and this does not seems in function the same or im just overlooking something.
我之前使用过一些轻量级的引导程序,这似乎在功能上并不相同,或者我只是忽略了一些东西。
回答by Daniel
You need to set class blueimp-gallery-controls
您需要设置类blueimp-gallery-controls
<div id="blueimp-gallery" class="blueimp-gallery blueimp-gallery-controls">

