2012-09-14 33 views
3

我相信我的問題有一個簡單的解決方案,但對於我的生活,我無法弄清楚我做錯了什麼。無法獲得bootstrap-lightbox工作....!

我想要在我的網站上運行bootstrap-lightbox(這是一個Django應用程序,如果這有什麼區別的話)。

我有我的頭以下:

<script type="text/javascript" src="/static/js/jquery-1.7.2.min.js"></script> 
<script type="text/javascript" src="/static/js/jquery-ui-1.8.16.custom.min.js"></script> 
<script src="static/dash/bootstrap-lightbox.js"></script> 
<script src="static/dash/excanvas.min.js"></script> 
<script src="static/dash/bootstrap.min.js"></script> 
<script src="static/dash/jquery.flot.min.js"></script> 
<script src="static/dash/jquery.gritter.min.js"></script> 
<script src="static/dash/jquery.flot.resize.min.js"></script> 
<script src="static/dash/jquery.peity.min.js"></script> 
<script src="static/dash/fullcalendar.min.js"></script> 
<script src="static/dash/unicorn.dashboard.js"></script> 
<script src="static/dash/unicorn.js"></script> 
<script src="static/dash/custom.js"></script> 
<link rel="stylesheet" href="static/dash/bootstrap.min.css" /> 
<link rel="stylesheet" href="static/dash/bootstrap-responsive.min.css" /> 
<link rel="stylesheet" href="static/dash/fullcalendar.css" /> 
<link rel="stylesheet" href="static/dash/unicorn.main.css" /> 
<link rel="stylesheet" href="static/dash/jquery.gritter.css" /> 
<link rel="stylesheet" href="static/dash/unicorn.grey.css" class="skin-color" /> 
<link rel="stylesheet" href="static/dash/bootstrap-lightbox.css" /> 

在我的HTML:

<a data-toggle="lightbox" href="#worldlightbox" class="thumbnail"><img src="/static/img/pics/bg/thumbs/WorldThumb.jpg" alt=""></a> 

<div class="lightbox" id="worldlightbox" style="display: none;"> 
<div class='lightbox-content'> 
    <img src="/static/img/pics/bg/World.jpg"> 
</div> 

當我點擊鏈接的圖像,沒有任何反應都沒有。控制檯中沒有錯誤,並且腳本加載正確.....

我很確定這裏存在一些衝突,因爲我試過的燈箱插件都沒有工作。

如果有人能證明我要出錯的地方,我會非常感激!

回答

9

對不起,這麼晚了,但我自己只是有問題。你的問題的簡單答案是,燈箱只是沒有按照它應該的方式工作。而且這種幫助很少而且不完整。我不知道開發者是如何得到他們的榜樣工作的。但是,我有我的工作,它應該爲你工作了:

<ul class="thumbnails" style=" position:relative; top: 110px; display:block;"> 
     <li class="span2"> 
     <a data-toggle="lightbox" href="#carouselLightBox" class="thumbnail">Open Lightbox</a>   
     </li> 
    </ul> 
    <div class="lightbox fade" id="carouselLightBox" style="display: none;"> 
     <div class='lightbox-content'> 
      <img src="/content/images/mapicons/cad.png" alt="" /> 
     </div> 
    </div> 

不管出於什麼原因,把你的一個標籤的「UL」內與類名縮略圖,然後命名您的一個標籤類縮略圖使其工作。希望Django將花時間儘快解決這個問題...

+2

謝謝J.G.泰勒 - 我可能會回過頭來看看,但同時我已經轉向了不依賴於燈箱效果的不同佈局。 – Erve1879