While I have seen issues with the Bootstrap Collapse functionality in IE, this one I think is different.
The thing collapses when you first click on the "Exclusively for you!" header, but clicking again won't open it.
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".
The window.ShowPanel variable is set from a Razor ViewBag variable:
<script type="text/javascript">
$(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"
});
})
});
</script>
Can anyone help me figure out why IE won't re-open the section?