JSFiddle - React, Tailwind, and code Playground

HTML

<iframe width="500" height="500" src="http://www.google.com" id="myframe"></iframe>
<div id="mydiv">Close the frame</div>

CSS

div#mydiv {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 100px;
    height: 75px;
    background-color: red;
    cursor: pointer;
}

JavaScript

$('#mydiv').click(function() {
    $('#myframe').remove();
});