I have successfully implemented a page overlay triggered by a button click, but I am facing difficulty in loading an external HTTP page such as www.google.com into this overlay. My goal is to display a mini webpage within the overlay. Is there a method to achieve this task? I have knowledge of iframes and how they can be used to load external content. How can I utilize an iframe within this overlay?
$(document).ready(function() {
$('.button').click(function() {
$('#fade-wrapper').fadeIn();
});
$('#fade-wrapper').click(function() {
$(this).fadeOut();
});
});
#fade-wrapper {
display: none;
position: fixed;
height: 100vh;
width: 100vw;
background: rgba(0, 0, 0, 0.5);
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div id="fade-wrapper"></div>
<input class="button" type="button" value="Overlay Button" />