Created
December 4, 2015 09:16
-
-
Save trigfa/8f0b45d6f71fa3956ff5 to your computer and use it in GitHub Desktop.
Hide input cells and prompts in Jupyter notebook. Useful if using RISE for slideshow
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
%%HTML | |
<script> | |
var code_show=true; //true -> hide code at first | |
function code_toggle() { | |
$('div.prompt').hide(); // always hide prompt | |
if (code_show){ | |
$('div.input').hide(); | |
} else { | |
$('div.input').show(); | |
} | |
code_show = !code_show | |
} | |
$( document ).ready(code_toggle); | |
</script> | |
<a href="javascript:code_toggle()">[Toggle Code]</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The code should be used in the first cell of the notebook. It's useful if you are using the excellent RISE for producing slideshows from a Jupyter notebook.