Wondering whether it’s possible to load the website with the menu open by default?
I want the menu to be a minor design feature.
Instead of clicking to expand the menu - you click to close… focusing the reader.
Cheers,
Connor
Wondering whether it’s possible to load the website with the menu open by default?
I want the menu to be a minor design feature.
Instead of clicking to expand the menu - you click to close… focusing the reader.
Cheers,
Connor
You could trigger a click event on the menu once the page loads via JavaScript.
Amazing!
Thanks for your insight.
Just did a bit of googling and this works great:
Before the closing body tag
<script>
$("document").ready(function() {
if($( window ).width() > 768){ /*Only runs in viewports above mobile landscape */
setTimeout(function() {
$(".menu-button").trigger('click');
},10);
}});
</script>
I’m maxing it trigger only on viewports that are larger than mobile landscape.