Skip to content

Instantly share code, notes, and snippets.

@d-v-b
Created February 10, 2016 18:54
Show Gist options
  • Save d-v-b/c2f0cc88f991c0c00507 to your computer and use it in GitHub Desktop.
Save d-v-b/c2f0cc88f991c0c00507 to your computer and use it in GitHub Desktop.
%%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