0
코드를 반복하지 않고 특정 콘텐츠를 부트 스트랩 모달에 넣을 방법을 찾고 있습니다.부트 스트랩 모달 : 동적 내용 구성
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel">Modal title</h4>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
<ul>
<li data-toggle="modal" data-target="#myModal" data-content="Content of Text1">Text1</li>
<li data-toggle="modal" data-target="#myModal" data-content="Content of Text2">Text2</li>
<li data-toggle="modal" data-target="#myModal" data-content="Content of Text3">Text3</li>
</ul>
는 그래서는 모달 (텍스트 1, 텍스트 2 또는 텍스트 3)이 클릭 된 항목을 이해하고 속성 데이터 컨텐츠에 저장된 컨텐츠를 표시 할만큼 똑똑해야 의미합니다.
어떻게하면됩니까?
그것은 부트 스트랩 문서에이 작업을 수행하는 방법을 설명합니다 : http://getbootstrap.com/javascript/#modals-related-target –
당신이 절을 읽게 [다양한 모달 내용 트리거] (http://getbootstrap.com/javascript/#modals-related-target)? – manix