0
我有一個主圖像,當我點擊該圖像時,一個模式框打開,其中有3個圖像。所以當我點擊模態框中的圖像之一時,它必須與主圖像交換我沒有任何想法如何做到這一點。請幫我我的代碼放在這裏如何通過使用jquery交換圖像?
<a href="#" data-toggle="modal" data-target="#myModal"><img class="img responsive curtain1"id="1" src="curtain.jpeg" ></a>
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Modal Header</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-4" id = "1">
<img src="curtaina1.jpg"style="height:35%;width:45%;" alt="one">
</div>
<div class="col-sm-4" id = "2">
<img src="curtaina1.jpg"style="height:35%;width:45%;"alt="two">
</div>
<div class="col-sm-4" id = "3">
<img src="curtaina1.jpg"style="height:35%;width:45%;"alt="three">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>