부모창 -> 모달 데이터 전달 필요시
$('#exampleModal').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget) // Button that triggered the modal
var recipient = button.data('whatever') // Extract info from data-* attributes
// If necessary, you could initiate an AJAX request here (and then do the updating in a callback).
// Update the modal's content. We'll use jQuery here, but you could use a data binding library or other methods instead.
var modal = $(this)
modal.find('.modal-title').text('New message to ' + recipient)
modal.find('.modal-body input').val(recipient)
})
반응형
'개발 > 웹 html + css' 카테고리의 다른 글
css. display: grid 사용법 (grid-template-columns, grid-template-rows, span) (0) | 2023.08.22 |
---|---|
web. 동적 이모지 추가 (0) | 2022.12.11 |
web. 구글 폰트 적용하기 (Lexend Deca 적용) (0) | 2022.12.11 |
web. 파비콘이란 + png에서 ico로 생성해주는 사이트 (0) | 2022.12.11 |