1// javascript
2<script>
3 document.getElementById("id").style.display = "none"; //hide
4 document.getElementById("id").style.display = "block"; //show
5 document.getElementById("id").style.display = ""; //show
6</script>
7
8// html
9<html>
10 <div id="id" style="display:none">
11 <div id="id" style="display:block">
12</html>
13
14// jquery
15<script>
16 $("#id").hide();
17 $("#id").show();
18</script>
19
1<div id="main">
2 <p> Hide/show this div </p>
3</div>
4
5('#main').hide(); //to hide
6
7// 2nd way, by injecting css using jquery
8$("#main").css("display", "none");