Performance issue with moving html with javascript on mobile device? [closed]
What is the likely performance impact for mobile devices if I use javascript to move some html from the bottom to the top of the page?
I want to create a menu like the boston globe where on mobile devices you just have a menu button, and clicking it makes the menu appear.
The issue is that my menu is at the bottom of my page. So I could absolutely position it at the top, hide it, and then reveal it when you click the button. The issue is that it will cover the content underneath it. I cant change the source order of my html, so the only solution i can think of is the use JavaScript to move the entire menu. Thanks
Most mobile devices that you'd probably be looking to target would have quite decent JS engines. In my experience the JS performance on mobile devices is quite impressively fast so I wouldn't worry about the performance impact of moving some HTML elements around the page.
精彩评论