모달창 바깥영역 눌렀을때 안닫히게 하려면 어떻게 해야해요?? 채택완료
김준수사랑
7개월 전
조회 1,581
var iframeModal_height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
$("#iframeModalWin").html('');
$('#iframeModalContent').height(parseInt(iframeModal_height * 0.85)); // 85%
$('#iframeModal').modal('show');
return false;
이렇게 열었는데 바깥영역을 누르면 닫히더라구요
바깥영역 눌렀을때 안닫히게 하고싶거든요.. 구글링해서 ..
$('#signup-modal').modal( {data-backdrop: 'static', data-keyboard: 'false'} );
data-backdrop='static' data-keyboard='false'
이런걸 넣어봐도 닫히더라구요.. 넣는방법이 잘못된것같은데.. 방법이 있을까요?
댓글을 작성하려면 로그인이 필요합니다.
답변 2개
채택된 답변
+20 포인트
마르스컴퍼니
Expert
7개월 전
</p>
<p>var iframeModal_height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
$("#iframeModalWin").html('<iframe id="iframeModalContent" src="' + move_href + '" style="display: block; border: none; width:100%;"></iframe>');
$('#iframeModalContent').height(parseInt(iframeModal_height * 0.85)); // 85%
$('#iframeModal').modal({
backdrop: 'static',
keyboard: false
});
return false;</p>
<p>
로그인 후 평가할 수 있습니다
답변에 대한 댓글 2개
�
김준수사랑
7개월 전
�
마르스컴퍼니
7개월 전
[code]
var iframeModal_height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
$("#iframeModalWin").html('<iframe id="iframeModalContent" src="' + move_href + '" style="display: block; border: none; width:100%;"></iframe>');
$('#iframeModalContent').height(parseInt(iframeModal_height * 0.85)); // 85%
// 부트스트랩 5 방식
var modal = new bootstrap.Modal(document.getElementById('iframeModal'), {
backdrop: 'static',
keyboard: false
});
modal.show();
return false;
[/code]
var iframeModal_height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
$("#iframeModalWin").html('<iframe id="iframeModalContent" src="' + move_href + '" style="display: block; border: none; width:100%;"></iframe>');
$('#iframeModalContent').height(parseInt(iframeModal_height * 0.85)); // 85%
// 부트스트랩 5 방식
var modal = new bootstrap.Modal(document.getElementById('iframeModal'), {
backdrop: 'static',
keyboard: false
});
modal.show();
return false;
[/code]
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
뒤에
backdrop: 'static',
keyboard: false
},'show');
.modal({
backdrop: 'static',
keyboard: false,
show: true,
});
이렇게 붙여봐도 안열리는데.. 어떻게 열죠?
$('#adultModal').modal( 'show'); 이거 한줄을 더 넣어버리면 뜨긴하는데 여전히 닫힙니다..
부트스크랩 5라서 이런가요;;;