Skip to content

Instantly share code, notes, and snippets.

@stefanv
Created November 12, 2012 19:50
Show Gist options
  • Save stefanv/4061500 to your computer and use it in GitHub Desktop.
Save stefanv/4061500 to your computer and use it in GitHub Desktop.
Hints in the notebook
Display the source blob
Display the rendered blob
Raw
{
"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