Created
November 12, 2012 19:50
-
-
Save stefanv/4061500 to your computer and use it in GitHub Desktop.
Hints in the 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
{ | |
"metadata": { | |
"name": "hint_box" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Hint box\n", | |
"\n", | |
"<script type=\"text/javascript\">\n", | |
"function toggle(d) {\n", | |
" if (document.getElementById(d).style.display == \"none\") {\n", | |
" document.getElementById(d).style.display = \"block\";\n", | |
" } else {\n", | |
" document.getElementById(d).style.display = \"none\";\n", | |
" }\n", | |
"}\n", | |
"</script>\n", | |
"\n", | |
"<style>\n", | |
" .hint {\n", | |
" display: none;\n", | |
" border: 1px solid black;\n", | |
" background: #eee;\n", | |
" padding: 10px;\n", | |
" margin-top: 10px;\n", | |
" }\n", | |
"<style>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<a href=\"#\" onclick=\"toggle('hint_1')\">Hint #1</a>\n", | |
"\n", | |
"<div id=\"hint_1\" class=\"hint\">\n", | |
" Here's something you may want to know:\n", | |
" \n", | |
" *Helpful hint*\n", | |
"</div>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [] | |
} | |
], | |
"metadata": {} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment