Last active
August 29, 2015 14:08
-
-
Save Kasahs/0da808d7c6ef9e5f7eaa to your computer and use it in GitHub Desktop.
Toggle visibility of an element. Chainable.
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
Element.prototype.toggleVisibility = function () { | |
this.style.visibility = (this.style.visibility == '' || this.style.visibility == 'visible') ? 'hidden' : 'visible'; | |
return this; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage: