Regarding Mobile UI

0
In the mobile browser env.
Whenever I click the top left menu, it seems like window top location gets moved to the very top of the whole page document.
This causes some issues that I lost the track of my previous scroll point so I have to scroll(swipe) down again to which the point I was moved away from.
Plus it seems like the mobile menu element gets appended and removed from the DOM on every click for entering and exiting the menu.
I am not sure if the design decision is related to the performance or the issue that I mentioned above, yet I thought it is better to make a fancy menu with classList with some CSS transform feature sets without element appending.
imgur
tjhLtTE
Like the pic, the whole menu itself lies in the script tag.
Just kinda weird that the web renders menu every time the user interacts with it,
If the SSR or user-specified data screening is the concern, you could easily do it with some {} and modern frameworks such as React or even maybe node based ejs, or whatever is.

And well I'd say it's time to ditch the jQuery :D