Commit 0fdd6ba9 authored by Steve Tjoa's avatar Steve Tjoa

removing hide input js

parent 17ae52a8
......@@ -11773,74 +11773,6 @@ div#notebook {
<div tabindex="-1" id="notebook" class="border-box-sizing">
<div class="container" id="notebook-container">
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[1]:</div>
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython2"><pre><span></span><span class="kn">import</span> <span class="nn">IPython.display</span> <span class="kn">as</span> <span class="nn">ipd</span>
<span class="c1"># Hide code by default when the notebook is exported as HTML.</span>
<span class="n">ipd</span><span class="o">.</span><span class="n">display_html</span><span class="p">(</span><span class="s1">&#39;&#39;&#39;</span>
<span class="s1">&lt;script&gt;</span>
<span class="s1">$(function() {</span>
<span class="s1"> if ($(&quot;body.notebook_app&quot;).length == 0) {</span>
<span class="s1"> $(&quot;.input&quot;).hide(); </span>
<span class="s1"> }</span>
<span class="s1">});</span>
<span class="s1">&lt;/script&gt;</span>
<span class="s1">&#39;&#39;&#39;</span><span class="p">,</span> <span class="n">raw</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
<span class="c1"># Create HTML buttons to show or hide IPython input cells.</span>
<span class="n">ipd</span><span class="o">.</span><span class="n">display_html</span><span class="p">(</span><span class="s1">&#39;&#39;&#39;</span>
<span class="s1">&lt;button onclick=&quot;$(&#39;.input&#39;).show();&quot;&gt;Show input&lt;/button&gt;</span>
<span class="s1">&lt;button onclick=&quot;$(&#39;.input&#39;).hide();&quot;&gt;Hide input&lt;/button&gt;</span>
<span class="s1">&#39;&#39;&#39;</span><span class="p">,</span> <span class="n">raw</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="prompt"></div>
<div class="output_html rendered_html output_subarea ">
<script>
$(function() {
if ($("body.notebook_app").length == 0) {
$(".input").hide();
}
});
</script>
</div>
</div>
<div class="output_area">
<div class="prompt"></div>
<div class="output_html rendered_html output_subarea ">
<button onclick="$('.input').show();">Show input</button>
<button onclick="$('.input').hide();">Hide input</button>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
......
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"<script>\n",
"$(function() {\n",
" if ($(\"body.notebook_app\").length == 0) {\n",
" $(\".input\").hide(); \n",
" }\n",
"});\n",
"</script>\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"<button onclick=\"$('.input').show();\">Show input</button>\n",
"<button onclick=\"$('.input').hide();\">Hide input</button>\n"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import IPython.display as ipd\n",
"\n",
"# Hide code by default when the notebook is exported as HTML.\n",
"ipd.display_html('''\n",
"<script>\n",
"$(function() {\n",
" if ($(\"body.notebook_app\").length == 0) {\n",
" $(\".input\").hide(); \n",
" }\n",
"});\n",
"</script>\n",
"''', raw=True)\n",
"\n",
"# Create HTML buttons to show or hide IPython input cells.\n",
"ipd.display_html('''\n",
"<button onclick=\"$('.input').show();\">Show input</button>\n",
"<button onclick=\"$('.input').hide();\">Hide input</button>\n",
"''', raw=True)"
]
},
{
"cell_type": "markdown",
"metadata": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment