自从我将 colobox 更新到 1.4.15 后,我遇到了一个问题:
在 DOM 中,我有 2 个 id="colorbox" 的 div,一个是隐藏的,另一个是可见的:
隐藏的:
<div id="colorbox" class="" role="dialog" tabindex="-1" style="display: none;">
<div id="cboxWrapper">
<div>
<div id="cboxTopLeft" style="float: left;"></div>
<div id="cboxTopCenter" style="float: left;"></div>
<div id="cboxTopRight" style="float: left;"></div>
</div>
<div style="clear: left;">
<div id="cboxMiddleLeft" style="float: left;"></div>
<div id="cboxContent" style="float: left;">
<div id="cboxTitle" style="float: left;"></div>
<div id="cboxCurrent" style="float: left;"></div>
<button id="cboxPrevious" type="button"></button>
<button id="cboxNext" type="button"></button>
<button id="cboxSlideshow"></button>
<div id="cboxLoadingOverlay" style="float: left;"></div>
<div id="cboxLoadingGraphic" style="float: left;"></div>
<button id="cboxClose" type="button"></button>
<div id="cboxLikes" style="float: left;"></div>
</div>
</div>
<div id="cboxMiddleRight" style="float: left;"></div>
</div>
<div style="clear: left;">
<div id="cboxBottomLeft" style="float: left;"></div>
<div id="cboxBottomCenter" style="float: left;"></div>
<div id="cboxBottomRight" style="float: left;"></div>
</div>
</div>
<div style="position: absolute; width: 9999px; visibility: hidden; display: none;"></div>
</div>
可见的
<div id="colorbox" class="cboxSlideshow_off" role="dialog" tabindex="-1" style="display: block; visibility: visible; top: 117px; left: 32px; position: absolute; width: 1200px; height: 631px;">
<div id="cboxWrapper" style="height: 631px; width: 1200px;">
<div>
<div style="clear: left;">
<div id="cboxMiddleLeft" style="float: left; height: 564px;"></div>
<div id="cboxContent" style="float: left; width: 858px; height: 564px;">
<div id="cboxLoadedContent" style="width: 858px; overflow: auto; height: 536px;">
<div id="cboxTitle" style="float: left; display: block;">LAN'Oween 2013</div>
<div id="cboxCurrent" style="float: left; display: block;">Image 1 sur 36</div>
<button id="cboxPrevious" type="button" style="display: block;">Précédante</button>
<button id="cboxNext" type="button" style="display: block;">Suivante</button>
<button id="cboxSlideshow" style="display: block;">Démarrer le diaporama</button>
<div id="cboxLoadingOverlay" style="float: left; display: none;"></div>
<div id="cboxLoadingGraphic" style="float: left; display: none;"></div>
<button id="cboxClose" type="button">Fermer</button>
</div>
<div id="cboxMiddleRight" style="float: left; height: 564px;"></div>
</div>
<div style="clear: left;">
<div id="cboxBottomLeft" style="float: left;"></div>
<div id="cboxBottomCenter" style="float: left; width: 858px;"></div>
<div id="cboxBottomRight" style="float: left;"></div>
</div>
</div>
初始化:
$("a.lightbox").colorbox(
{
slideshow: true,
slideshowSpeed: 5000,
slideshowAuto: false,
slideshowStart: "Démarrer le diaporama",
slideshowStop: "Arrêter le diaporama",
current: "Image {current} sur {total}",
previous: "Précédante",
next: "Suivante",
close: "Fermer",
maxWidth: "95%",
maxHeight: "95%",
rel: 'teamzerty'
}
);
问题是我无法操纵盒子。
我正在使用: - JQuery 2.0.0 - JQuery UI 1.10.3 - colobox 1.4.15
感谢帮助。
示例:http ://www.team-azerty.com/html/lan/lan-galerie-59-lan-oween-2013.html