Hints
fadeIn() function used to blink and show the element.Example :1, when you click an element it shows another element appear with some blink.
fadeOut() function used to blink and hide the element.Example :2, when you click an element it hide another element with some blink.
|
<html>
<head>
<title>HTML-JQuery</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript">
$(function () {
$(".one").click(function () {
$(".two").fadeIn();
});
});
</script>
<style>
.two{
display: none;
}
</style>
</head>
<body>
<div class="one">Click here to fade In next element</div>
<div class="two">I fade In</div>
</body>
</html>
|
Example: 2 Demo
|
Example:1 Demo
|
<html>
<head>
<title>HTML-JQuery</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript">
$(function () {
$(".one").click(function () {
$(".two").fadeOut();
});
});
</script>
</head>
<body>
<div class="one">Click here to fade out next element</div>
<div class="two">I am going to fade out</div>
</body>
</html>
|