I have a site with a typical desktop dropdown menu. For the mobile menu (and on touch devices), I am using javascript to slide it out onto the page from the right side by touching a menu button.
The issue is that I am using javascript to duplicate the desktop menu and populate it into the hidden side div. Is this a bad idea? I don't see much of a performance drop (only like 50ms or so when I disable JS), but could this cause issues on slower computers?
Or would it be better to duplicate the menu into the side div through PHP so it's directly in the source code? Doing this will probably be faster, but will it have an impact on my SEO by displaying the navigation twice to search engines?
Looking at http://searchengineland.com/tested-googlebot-crawls-javascript-heres-learned-220157, it seems like it's already being crawled twice, so I should think about my visitors overall experience and duplicate it without the use of javascript.
What is the best practice when dealing with the same menu multiple times on the page?