What's the most efficient way to hide content for a mobile version of a site?

前端 未结 5 2021
说谎
说谎 2021-01-20 16:03

I\'m working on a mobile version of a large site. There\'s a lot of content from the full site that\'s not needed for mobile.

What is the best way to hide this? i.e

5条回答
  •  野性不改
    2021-01-20 16:26

    A very fast way to add or remove HTML is to use innerHTML, something like:

    node.innerHTML = '';
    node.parentNode.removeChild(node);
    

    And you can place these commands in a SCRIPT tag at the end of the BODY tag.

提交回复
热议问题