我是JQuery的新手,我正在製作一個製作您自己的輪播,其中有一系列圖片,並且您希望在點擊時將圖片添加到輪播。JQuery和Bootstrap:如何將圖像列表中的圖像添加到輪播?
頁面左側有圖片可供選擇,傳送帶位於右側。圖像列表的代碼就像這樣。
<div class="pics">
<div class="col-sm-4 iu">
<img src="img/iu.png" alt="IU" class="img-thumbnail" style="width:150px; height:150px;">
</div>
<div class="col-sm-4 hyuna">
<img src="img/hyuna.png" alt="hyuna" class="img-thumbnail" style="width:150px; height:150px;">
</div>
的旋轉木馬幻燈片的代碼是這個
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="img/minah.png" alt="minah" />
<div class="carousel-caption">
<h1>This is Minah.</h1>
</div>
</div>
<div class="item">
<img src="img/juwoo.png" alt="juwoo" />
<div class="carousel-caption">
<h1>This is Juwoo.</h1>
</div>
頁開始與在地方已經是默認的旋轉木馬和它應該被點擊從列表中的圖像時,成爲完全是空的。
默認輪播顯示所有圖像嗎?此外,「當點擊列表中的圖像時,它應該變爲完全空白。」這是否意味着當單擊圖像或僅顯示單擊圖像時,傳送帶變空了? – chackerian
默認輪播僅顯示一些圖像。當點擊圖像時,默認輪播會消失,點擊的圖像將會傳送到輪播。 – user298519