Created
October 27, 2015 19:11
-
-
Save o4tuna/5be09a003d0fe299466d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>reveal_hidden_div_and_flash_it.html</title> | |
<style> | |
@keyframes flash { | |
to {background-color: lemonChiffon;} | |
} | |
div#my_division { | |
display: none; | |
animation: flash 3s ease 250ms 1; | |
} | |
div#my_division { | |
margin: 3rem; | |
padding: 2rem; | |
} | |
</style> | |
<script> | |
function showHideElement(box,id) { | |
var elm = document.getElementById(id) | |
elm.style.display = box.checked? "none" : "block"; | |
} | |
</script> | |
</head> | |
<body> | |
<input id="chkIsHidden" type="checkbox" checked value="" onClick="showHideElement(this,'my_division')"> Hide my_division | |
<div id="my_division"> | |
<p>Howdy, I'm my_division!</p> | |
<p>Peek-a-boo!</p> | |
</div> | |
<body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment