<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("#hide").click(function(){
        $("p").hide();
    });
    $("#show").click(function(){
        $("p").show();
    });
});
</script>
</head>
<body>

<p>If you click on the "Hide" button, I will disappear.</p>

<button id="hide">Hide</button>
<button id="show">Show</button>


&nbsp;

&nbsp;
<h2>Code for this Example :</h2>

<hr />

<pre>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"&gt;&lt;/script&gt;
&lt;script&gt;
$(document).ready(function(){
    $("#hide").click(function(){
        $("p").hide();
    });
    $("#show").click(function(){
        $("p").show();
    });
});
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;p&gt;If you click on the "Hide" button, I will disappear.&lt;/p&gt;

&lt;button id="hide"&gt;Hide&lt;/button&gt;
&lt;button id="show"&gt;Show&lt;/button&gt;

&lt;/body&gt;
&lt;/html&gt;</pre>
&nbsp;

<hr />

</body>
</html>