Created
May 1, 2014 19:19
-
-
Save nanusdad/8e646dccf0091f9c4e0d to your computer and use it in GitHub Desktop.
Javascript function to hide / show element by ID
This file contains hidden or 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
function showStuff(id, text, btn) { | |
//show | |
document.getElementById(id).style.display = 'block'; | |
//hide | |
document.getElementById(text).style.display = 'none'; | |
//hide | |
btn.style.display = 'none'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment