Created
February 19, 2016 19:22
-
-
Save GeauxEric/99fc4ee1916329dd7a51 to your computer and use it in GitHub Desktop.
toggle the code cell in the html output of ipython notebook
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
| <!-- thanks to https://github.com/Saynah --> | |
| <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