Hello
I have done a table of contents for my page article, on mobile when clicking to the table of content it opens the menu by changing its height from 0px to auto. Then we can click to a link and it scrolls to the section but the menu stays open so I added an animation when clicking to “.tocitem” link class it change the menu’s height back to 0px. But then when I want to click back to the table of content to open it I have to double tap because the second click animation to close it is still “running”. I tried asking GPT and deepseek to add a click to my table of content div whenever I tap to my “.tocitem” link, but no success.
This is not a priority, more of a good experience so Im fine if there is no solution we can still close the menu manually, but if anybody has a solution I would be grateful. Thanks. Please only view on mobile
Live preview
[2]: Blog ID Constructions - Articles BTP