Thanks for sharing this! That would be this approach:
<script>
$(document).ready(function(){
jQuery(function(){
jQuery('button.btn-sidebar-toggle).click();
});
})
</script>
Which effects the sidebar to slide to the hidden state. So there’s an automatic animation on document ready which is not that ideal.
I actually also thought that the sidebar is controlled by the aria attribute, so I had tried this:
<script>
$(document).ready(function(){
$("button.btn-sidebar-toggle").attr("aria-expanded","false");
})
</script>
But the attribute is not controlling the state, it’s only indicating it. So that snippet will change the attribute, but not the state ![]()