Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update index.html
  • Loading branch information
maa17019 committed Jun 19, 2020
1 parent a5de5d9 commit 70a14a9
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions index.html
Expand Up @@ -274,67 +274,54 @@
///////////////////////////////////////////////////////
// First modal image on Keyframe//
var modal = document.getElementById("myModal");

// Get the image and insert it inside the modal - use its "alt" text as a caption
var img = document.getElementById("myImg");
var modalImg = document.getElementById("img01");

img.onclick = function(){
modal.style.display = "block";
modalImg.src = this.src;
captionText.innerHTML = this.alt;
}

// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];

// When the user clicks on <span> (x), close the modal
span.onclick = function() {
modal.style.display = "none";
}
///////////////////////////////////////////////////////
// Second modal image on Shorthand syntax//
var model = document.getElementById("myModel");

// Get the image and insert it inside the modal - use its "alt" text as a caption
var img = document.getElementById("short");
var modelImg = document.getElementById("img02");

img.onclick = function(){
model.style.display = "block";
modelImg.src = this.src;
captionText.innerHTML = this.alt;
}

// Get the <span> element that closes the modal
var span = document.getElementsByClassName("closee")[0];

// When the user clicks on <span> (x), close the modal
span.onclick = function() {
model.style.display = "none";
}
///////////////////////////////////////////////////////
// Third modal image on Dimensions of bubble//
var mode = document.getElementById("myMode");

// Get the image and insert it inside the modal - use its "alt" text as a caption
var img = document.getElementById("final");
var modeImg = document.getElementById("img03");

img.onclick = function(){
mode.style.display = "block";
modeImg.src = this.src;
captionText.innerHTML = this.alt;
}

// Get the <span> element that closes the modal
var span = document.getElementsByClassName("closeee")[0];

// When the user clicks on <span> (x), close the modal
span.onclick = function() {
mode.style.display = "none";
}

</script>

</body>
Expand Down

0 comments on commit 70a14a9

Please sign in to comment.