To begin with, each item that you want to hide/show should have a unique HTML ID. Let’s begin with a very simple HTML page.
<h1>This is my title</h1>
This is where my first div will be.
This is where my second div will be.
We will then write a function that will hide all of the appropriate divs (in this case, div1 and div2).
With mobile browsers becoming more and more prevalent, it becomes more and more necessary to develop a version of your Web site for those browsers. There are a lot of scripts out there that are designed to detect mobile browsers, but many of them need to be updated every time a new mobile browser is developed.