반응형
Notice
Recent Posts
Recent Comments
Link
«   2023/09   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Archives
Today
Total
관리 메뉴

둘에서 하나로....

bootstrap modal 안에 modal을 띄울경우 배경처리 본문

잡동사니

bootstrap modal 안에 modal을 띄울경우 배경처리

서기㏇ 2021. 12. 22. 15:48
반응형
 
<script>
$(document).on('show.bs.modal', '.modal', function() {
  const zIndex = 1040 + 10 * $('.modal:visible').length;
  $(this).css('z-index', zIndex);
  setTimeout(() => $('.modal-backdrop').not('.modal-stack').css('z-index', zIndex - 1).addClass('modal-stack'));
});
  </script>

bootstrap에서 모달 안쪽에 모달을 띄울경우 
새로운 모달의 아래 배경은 까맣게 처리가 안되는 경우가 있다. 

그럴경우 위 코드를 넣어보자.

 

 

반응형
Comments