是否可以将轮播指示器列表放在轮播分区之外?在底部,我问是否可以在整个页面中搜索与其相关联的类的特定元素.
我想象的是这样的:
<div id="presentation" class="tab-pane active"> <div id="presentationCarousel" class="carousel slide"> <div class="carousel-inner"> <div class="item active"><img src="...1.jpg" alt="" /></div> <div class="item active"><img src="...2.jpg" alt="" /></div> <div class="item active"><img src="...3.jpg" alt="" /></div> </div> <a class="carousel-control left" href="#presentationCarousel" data-slide="prev">‹</a> <a class="carousel-control right" href="#presentationCarousel" data-slide="next">›</a> </div> </div> <div id="chapterList"> <ol class="carousel-indicators"> <li data-target="#presentationCarousel" data-slide-to="0" class="active"></li> <li data-target="#presentationCarousel" data-slide-to="1"></li> <li data-target="#presentationCarousel" data-slide-to="3"></li> </ol> </div>
可能吗?
只是补充一下,我检查了bootstrap JS源代码并找到了这一行:
this.$indicators = this.$element.find('.carousel-indicators')
它只是填充列表指标.我想这个引用是用于表示div元素.
JAVASCRIPT问题
this.$indicators = $element.find('.carousel-indicators')
任何建议都将受到高度赞赏.谢谢!