load iframe in bootstrap modal

后端 未结 6 1641
青春惊慌失措
青春惊慌失措 2020-12-14 22:00

I want to load an iframe into a bootstrap modal and show a loader before the iframe is loaded. I am using a simple jquery click function, but it is not working. I do not und

6条回答
  •  被撕碎了的回忆
    2020-12-14 22:29

    I also wanted to load any iframe inside modal window. What I did was, Created an iframe inside Modal and passing the source of target iframe to the iframe inside the modal.

    function closeModal() {
      $('#modalwindow').hide();
      var modalWindow = document.getElementById('iframeModalWindow');
      modalWindow.src = "";
    }
    .modal {
      z-index: 3;
      display: none;
      padding-top: 5%;
      padding-left: 5%;
      position: fixed;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      overflow: auto;
      background-color: rgb(51, 34, 34);
      background-color: rgba(0, 0, 0, 0.4)
    }
    
    

提交回复
热议问题