My modal window opens when a user clicks on a div, but I'm having an issue. The modal window doesn't reopen when I click on the div again. Here is my code:
<div onclick="document.getElementById('id01').style.display='block'" class="mkdf-elements-holder-item-content mkdf-elements-holder-custom-184744" style="padding: 300px 0 200px 0">
<div id="id01" class="w3-modal">
<div class="w3-modal-content w3-card-4">
<header style="background-color:transparent;" class="w3-container w3-teal">
<span onclick="close();"
class="w3-button w3-display-topright">×</span>
<h2 style="background-color:transparent; color: transparent"> V </h2>
</header>
<div class="w3-container">
<iframe id="ifr" width="560" height="315" src="https://www.youtube.com/embed/u9dC7xIl1oU" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen allowscriptaccess="always"></iframe>
</div>
</div>
</div>
<script>
function close(){
$("#id01").css("visibility", "hidden");
autoOpen: false,
$("#ifr").attr("src","");
}
</script>