বৃহস্পতিবার, ২১ এপ্রিল, ২০১১

show hide panel by jquery

<html>
<head>

<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("button").click(function(){
if($("button").html() == 'show'){
$("button").html("hide");
}
else {
$("button").html("show");
}
$(".panel").slideToggle("slow");
});
});
</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:none;
}
</style>
</head>

<body>

<div class="panel">
<p>Because time is valuable, we deliver quick and easy learning.</p>
<p> you can study everything you need to learn, in an accessible and handy format.</p>
</div>

<button>show</button>
</body>
</html>

কোন মন্তব্য নেই:

একটি মন্তব্য পোস্ট করুন