1
我在Bootstrap項目中使用貓頭鷹旋轉木馬。我希望當我點擊旋轉木馬的圖像時,即正在打開的模式,必須向我顯示之前點擊過的確切圖像(更大),而不是旋轉木馬的第一個圖像。如何在點擊貓頭鷹傳送帶中的圖像後在引導模式中打開精確圖像?
有人可以幫我嗎?
我做了一個FIDDLE
HTML
<div class="container GListFullWidth">
<div class="row">
<div class="col-md-12">
<!-- owl-carousel -->
<div id="owl-onpage">
<div class="item"><a data-toggle="modal" data-target="#GListModalGallery"><img src="http://lorempixel.com/800/500/sports/6/" class="img-responsive" /></a></div>
<div class="item"><a data-toggle="modal" data-target="#GListModalGallery"><img src="http://lorempixel.com/600/400/sports/7/" class="img-responsive" /></a></div>
<div class="item"><a data-toggle="modal" data-target="#GListModalGallery"><img src="http://lorempixel.com/700/550/sports/8/" class="img-responsive" /></a></div>
<div class="item"><a data-toggle="modal" data-target="#GListModalGallery"><img src="http://lorempixel.com/300/600/sports/9/" class="img-responsive" /></a></div>
<div class="item"><a data-toggle="modal" data-target="#GListModalGallery"><img src="http://lorempixel.com/800/500/sports/6/" class="img-responsive" /></a></div>
<div class="item"><a data-toggle="modal" data-target="#GListModalGallery"><img src="http://lorempixel.com/600/400/sports/7/" class="img-responsive" /></a></div>
<div class="item"><a data-toggle="modal" data-target="#GListModalGallery"><img src="http://lorempixel.com/700/550/sports/8/" class="img-responsive" /></a></div>
<div class="item"><a data-toggle="modal" data-target="#GListModalGallery"><img src="http://lorempixel.com/300/600/sports/9/" class="img-responsive" /></a></div>
</div>
<!-- /owl-carousel -->
<span class="caption text-muted">A Chinese tale tells of some men sent to harm a young girl who, upon seeing her beauty, become her protectors rather than her violators.</span>
<!-- modalGallery -->
<div class="modal" id="GListModalGallery" tabindex="-1" role="dialog" aria-labelledby="GListModalGalleryLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
<div id="owl-modal">
<div class="item"><img src="http://lorempixel.com/800/500/sports/6/" /></div>
<div class="item"><img src="http://lorempixel.com/600/400/sports/7/" /></div>
<div class="item"><img src="http://lorempixel.com/700/550/sports/8/" /></div>
<div class="item"><img src="http://lorempixel.com/300/600/sports/9/" /></div>
<div class="item"><img src="http://lorempixel.com/800/500/sports/6/" /></div>
<div class="item"><img src="http://lorempixel.com/600/400/sports/7/" /></div>
<div class="item"><img src="http://lorempixel.com/700/550/sports/8/" /></div>
<div class="item"><img src="http://lorempixel.com/300/600/sports/9/" /></div>
</div>
</div>
</div>
</div>
</div>
<!-- /modalGallery -->
</div><!-- /col-md-12 -->
</div><!-- /row -->
@ferocesalatino最終評論。我會更新我的帖子。成功 – Zl3n