title: Bootstrap Panel Collapse and IE
body: <p>While I have seen issues with the Bootstrap Collapse functionality in IE, this one I think is different.</p>
  
  <p>The thing collapses when you first click on the "Exclusively for you!" header, but clicking again won't open it.</p>
  
  <p>I have to "store" the fact that they closed it in a session variable so I have a function in my controller to do that and it is called when the header is clicked. I collapse again when the page is loaded if the ShowPanel is set to "false".</p>
  
  <p>The window.ShowPanel variable is set from a Razor ViewBag variable:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function () {
          window.ShowPanel = "@ViewBag.ShowPanel";
          // Initialize due to IE bug. from some SO post
          $('#collapseOne').collapse({ toggle: false });
  
          if (window.ShowPanel === "false") {
              $('#collapseOne').collapse('hide');
          }
  
          $('#panel_head').on('click', function () {
              $.ajax({
                  async: true,
                  type: "GET",
                  url: "/Home/SetShowPanel"
              });
          })
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Can anyone help me figure out why IE won't re-open the section?</p>
  
  <p>Fiddle: <a href="http://jsfiddle.net/Mrbaseball34/wwvogjkk/" rel="nofollow">http://jsfiddle.net/Mrbaseball34/wwvogjkk/</a></p>