Jquery show and hide

Example : Show/hide
Isi konten anda di sini hide

HTML (jquery.html)
<html>
<head>
<title>www.qwebsite.blogspot.com</title>
<style>
.slidingDiv {
height:300px;
background-color: #99CCFF;
padding:20px;
margin-top:10px;
border-bottom:5px solid #3399FF;
}
.show_hide {
display:none;
}
</style>
</head>
<body>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
    $(".slidingDiv").hide();
$(".show_hide").show();

$('.show_hide').click(function(){
$(".slidingDiv").slideToggle();
});

});
</script>
 <a href="#" class="show_hide">Show/hide</a><br />
    <div class="slidingDiv">

        Isi konten anda di sini <a href="#" class="show_hide">hide</a>
    </div>
</div>
</body>
</html>

Tidak ada komentar:

Posting Komentar

Leave a message