2014-10-18 112 views
2

我使用ekko燈箱以及引導模式來創建一個畫廊。然而,我似乎無法讓圖像導航控件出現/像在這個示例中一樣工作:http://ashleydw.github.io/lightbox/#image-galleryBootstrap Gallery with Lightbox

正如你所看到的,當你將鼠標懸停在圖像上時,你會看到導航控制箭頭。我已經嘗試將數據屬性data-gallery =「multiimages」添加到我的圖像,但這沒有幫助。

你可以看到我的開發代碼在這裏:http://agtdesigns.co.uk/bootstrap-gallery/

讚賞任何幫助,

TIA

+1

你包括Glyphicons Fonts文件夾和路徑是正確的? '../fonts/glyphicons-halflings-regular.eot' – Macsupport 2014-10-19 00:55:18

+0

我也上傳了字體文件夾,但不知道我應該鏈接到哪裏? – 2014-10-19 08:41:40

+0

應該在與css文件夾相同的文件夾中,3個文件夾應該有css,js,fonts – Macsupport 2014-10-19 14:48:17

回答

2

我有同樣的問題, 看到https://github.com/ashleydw/lightbox/issues/33的答案。

總之,你需要添加一個包裝的div,如

<div class="gallery"> 

然後爲JS代碼

$(document).delegate('*[data-toggle="lightbox"]', 'click', function(event) { 
     event.preventDefault(); 
     return $(this).ekkoLightbox({ 
      always_show_close: true, 
      gallery_parent_selector: '.gallery', 
    }); 
});