Mobile menu: Clicking on link to section affects interactions

First of all, hello everyone!

I’m trying to make my mobile menu close after clicking a link to one of the page’s sections #harmonogram (schedule). Link to the section works on all the subpages except the home page where this particular section is located.

I have a “hide mobile menu” interaction set up after clicking the link in the menu, but it doesn’t really work - the menu freezes and none of the interactions (dropdowns, x button) works either.

Probably it’s something simple that I’ve missed but I think I reached a dead end in solving this.

Anyone experienced/solved this kind of issue?

Thanks in advance!


Here is my public share link: Webflow - swingout

Finally, I’ve found a solution myself, so I thought I’ll share it here. Still haven’t found a native Webflow solution though.


<script>
document.getElementById("nav-btn-schedule").addEventListener("click", function() {
    window.location.href = "https://swingout.pl/#harmonogram";
    window.location.reload();
});
</script>