【问题标题】:Bootstrap-Image-Gallery doesn't show full imagesBootstrap-Image-Gallery 不显示完整图像
【发布时间】:2016-08-17 12:58:58
【问题描述】:

我无法使最简单的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>

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

为什么?我做错了什么?

满足所有先决条件:

控制台没有错误。

【问题讨论】:

  • 您是否尝试过将脚本放在头部?
  • 另外,在 github 中,它说 blueimpv2.16.0 是必需的。有没有添加?
  • @Kode.Error404 是的,我使用的是 Gallery 2.21.3

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


【解决方案1】:

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

jQuery 1.11.3 按预期工作。

【讨论】:

    猜你喜欢
    • 2023-03-17
    • 1970-01-01
    • 2019-11-11
    • 1970-01-01
    • 1970-01-01
    • 2014-11-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多