Show Hide in jquery

Satyapriyanayak
Posted by Satyapriyanayak under jQuery category on | Points: 40 | Views : 1464
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/javascript" src="jquery-1.6.2.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".flip").click(function(){
// $(".panel").toggle(); // only toggle
// $(".panel").slideToggle("slow"); // with animation
//$(".panel").slideToggle("fast");
$(".panel").slideToggle(1000); // with time


});
});
</script>

<style type="text/css">
div.panel,p.flip
{
margin:0px;
padding:5px;
text-align:center;
background:#e5eecc;
border:solid 1px #c3c3c3;
}
div.panel
{
height:120px;
display:block;
/*display:none;*/

}
</style>
</head>

<body>
<div class="panel">
<p>Welcome to dotnet funda.</p>
<p></p>
</div>

<p class="flip">Show/Hide Panel</p>
</body>
</html>

Comments or Responses

Login to post response