1
2$("#hide").click(function(){
3 $("p").hide();
4});
5
6$("#show").click(function(){
7 $("p").show();
8});
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");