Created
December 30, 2016 10:00
-
-
Save dkapitan/c63058e30576ca35083117e7a2da2e0b to your computer and use it in GitHub Desktop.
Toggle code in jupyter notebook
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
<script> | |
function code_toggle() { | |
if (code_shown){ | |
$('div.input').hide('500'); | |
$('#toggleButton').val('Show Code') | |
} else { | |
$('div.input').show('500'); | |
$('#toggleButton').val('Hide Code') | |
} | |
code_shown = !code_shown | |
} | |
$( document ).ready(function(){ | |
code_shown=false; | |
$('div.input').hide() | |
}); | |
</script> | |
<form action="javascript:code_toggle()"><input type="submit" id="toggleButton" value="Show Code"></form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment