开发者

Performance issue with moving html with javascript on mobile device? [closed]

开发者 https://www.devze.com 2023-04-11 11:50 出处:网络
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time,or an extraordinarily narrow situation that is not generally applic
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audie开发者_运维技巧nce of the internet. For help making this question more broadly applicable, visit the help center. Closed 11 years ago.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号