Bootstrap-Image-Gallery不显示完整图像

时间:2016-08-17 12:58:58

标签: jquery html twitter-bootstrap blueimp bootstrap-image-gallery

我无法使最简单的Bootstrap-Image-Gallery示例工作。

我的网站上有以下HTML:

<!DOCTYPE HTML>
<head>
  <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
  <link rel="stylesheet" href="bower_components/blueimp-gallery/css/blueimp-gallery.min.css">
  <link rel="stylesheet" href="bower_components/Bootstrap-Image-Gallery/css/bootstrap-image-gallery.min.css">
</head>
<body>
  <!-- The Bootstrap Image Gallery lightbox, should be a child element of the document body -->
  <div id="blueimp-gallery" class="blueimp-gallery">
      <!-- The container for the modal slides -->
      <div class="slides"></div>
      <!-- Controls for the borderless lightbox -->
      <h3 class="title"></h3>
      <a class="prev">‹</a>
      <a class="next">›</a>
      <a class="close">×</a>
      <a class="play-pause"></a>
      <ol class="indicator"></ol>
      <!-- The modal dialog, which will be used to wrap the lightbox content -->
      <div class="modal fade">
          <div class="modal-dialog">
              <div class="modal-content">
                  <div class="modal-header">
                      <button type="button" class="close" aria-hidden="true">&times;</button>
                      <h4 class="modal-title"></h4>
                  </div>
                  <div class="modal-body next"></div>
                  <div class="modal-footer">
                      <button type="button" class="btn btn-default pull-left prev">
                          <i class="glyphicon glyphicon-chevron-left"></i>
                          Previous
                      </button>
                      <button type="button" class="btn btn-primary next">
                          Next
                          <i class="glyphicon glyphicon-chevron-right"></i>
                      </button>
                  </div>
              </div>
          </div>
      </div>
  </div>
  <div id="links">
      <a href="images/banana.jpg" title="Banana" data-gallery>
          <img src="images/thumb.jpg" alt="Banana">
      </a>
  </div>
  <script src="bower_components/jquery/dist/jquery.min.js"></script>
  <script src="bower_components/blueimp-gallery/js/jquery.blueimp-gallery.min.js"></script>
  <script src="bower_components/Bootstrap-Image-Gallery/js/bootstrap-image-gallery.min.js"></script>
</body>

它显示了香蕉的缩略图,但是当我点击它时,页面就变黑了,没有任何反应。

为什么呢?我做错了什么?

所有先决条件都得到满足:

控制台没有错误。

1 个答案:

答案 0 :(得分:0)

啊,似乎Bootstrap-Image-Gallery(或Gallery本身)无法与jQuery 3.1.0一起使用。

jQuery 1.11.3按预期工作。