<!DOCTYPE html>
<html>
<head>
<title>jQuery fadeIn() and fadeOut() methods</title>
<script src="jquery-latest.min.js"></script>
<script>
$(document).ready(function() {
$("#fadein").click(function(){
$("div").fadeIn(3000);
});
$("#fadeout").click(function(){
$("div").fadeOut(3000);
});
});
</script>
<style type="text/css">
div {
background: #FC5E5E;
font-family: arial;
padding: 10px;
}
</style>
</head>
<body>
<button id="fadein">Fade In (3 Seconds)</button>
<button id="fadeout">Fade Out (3 Seconds)</button>
<br /><br />
<div>This element represent fade in and fade out effect.</div>
</body>
</html>