Javascript issuesssss!!!!!!!!!
can someone explain to me how i make the script so i can can click the second image and have it enlarge like the first image does...heres the code.... <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> <img id="myImg" src="http://i64.tinypic.com/4ih8ug.jpg" alt="atom" style="width:90%;max-width:200px"> <img id="myImg" src="http://i64.tinypic.com/4ih8ug.jpg" alt="atom" style="width:90%;max-width:200px"> <div id="myModal" class="modal"> <span class="close">×</span> <img class="modal-content" id="img01"> <div id="caption"></div> </div> <script> var modal = document.getElementById('myModal'); var img = document.getElementById('myImg'); var modalImg = document.getElementById("img01"); var captionText = document.getElementById("caption"); img.onclick = function(){ modal.style.display = "block"; modalImg.src = this.src; captionText.innerHTML = this.alt; } var span = document.getElementsByClassName("close")[0]; span.onclick = function() { modal.style.display = "none"; } </script> </body> </html>



