-1
I have a modal window inside of a div, when passing the mouse on top, I make the div change color and opens a modal window with photo, the problem is that this modal window just opens, and just doesn’t close. Someone can help me with this, I don’t know where else to turn.
<script>
     function clique(img){
       var modalJ=document.getElementById("janelaModal");
       var modalI=document.getElementById("imgModal").src=["pg/CadastroUsuario.jpg"];
       var modalB=document.getElementById("btFechar");
       modalJ.style.display="block";
       modalI.src=img;
       modalB.onclick=function(){
        modalJ.style.display="none";
       }
     } 
    </script>
   <style type="text/css">
        .servico:hover {
         cursor: zoom-in;
         background:orange;
        }
     </style>
And here’s the code for the div and the modal window.
<article class="servico wow fadeInUp" onclick='clique("imgModal")';>        
<a href="#" class="fadeImg"><img src="imag/monitor.png" alt="Logo do sistema"></a>
    <div class="inner">         
    <a href="#"><center><h3>Tela Inicial</h3></center></a>
    <h4>Uma empresa segura e com seus dados bem guardados, protegidos e também gerando uma rede de informações mais rápida!.</h4>
    </div>  
         <div id="janelaModal">
         <span id="btFechar">X</span>
         <img id="imgModal">     
        </div>          
</article>
						
It worked, mds very very much thank you young man, saved my life! God bless you.
– Joana
Welcome. See what to do when a reply has met you at this link [tour]
– Sam