<!DOCTYPE html>
<html>
<head>
<title>jQuery hide() show() function</title>
<script src="jquery-latest.min.js"></script>
<script>
$(document).ready(function() {
$("#btn1").hide();
$("p").hide();
$("#btn2").click(function () {
$("p").show("slow");
$("#btn2").hide();
$("#btn1").show();
});
$("#btn1").click(function () {
$("p").hide("slow");
$("#btn1").hide();
$("#btn2").show();
});
});
</script>
<style type="text/css">
p {
background-color: #99FFFF;
font-size: 16px;
}
</style>
</head>
<body>
<button id="btn1">Hide Paragraph</button>
<button id="btn2">Show Paragraph</button>
<p>This paragraph will be hide/show animated.</p>
</body>
</html>