title: code cells do not collapse after export to html with TOC
body: <p>I tend to use this code and package to make code cells collapsible and share output of a notebook as HTML with TOC:</p>
  <pre><code>library(IRdisplay)
  
  display_html(
  '
  
  &lt;script&gt;  
  code_show=true; 
  function code_toggle() {
    if (code_show){
      $(\'div.input\').hide();
    } else {
      $(\'div.input\').show();
    }
    code_show = !code_show
  }  
  $( document ).ready(code_toggle);
  &lt;/script&gt;
    &lt;form action=&quot;javascript:code_toggle()&quot;&gt;
      &lt;input type=&quot;submit&quot; value=&quot;Code On/Off&quot;&gt;
   &lt;/form&gt;
  
  &lt;style type=&quot;text/css&quot;&gt;
  
  .container { width:80% !important; }
  
  .main-container {
    max-width: 2000px;
    margin-left: 100px;
    margin-right: 10px;
  }
  
  /*body{font-family: Lucida Sans Unicode} */
  
  .nav&gt;li&gt;a {
      position: relative;
      display: block;
      padding: 10px 15px;
      color: #004F59;
  }
  .nav-pills&gt;li.active&gt;a, .nav-pills&gt;li.active&gt;a:hover, .nav-pills&gt;li.active&gt;a:focus {
      color: #ffffff;
      background-color: #004F59;
  }
  
  .list-group-item.active, .list-group-item.active:focus, .list-group-item.active:hover {
      background-color: #004F59;
  }
  &lt;/style&gt;
  
  '
  )
  </code></pre>
  <p>I recently had to switch machines/laptops and although this still works when run inside Jupyter the exported HTHL + TOC shows the code and the depicted button is not responsive (i.e. does not collapse the code cells). I am trying to isolate the problem. What could be the reason for this behaviour? Thanks.</p>