How to use Effect FadeIn() and FadeOut() Method in JQuery
In this article I am going to explain about FadeIn() and FadeOut() Method in jQuery
jQuery FadeIn() and FadeOut() Method
jquery FadeIn() and FadOut() Method use for change the opacity of selected element. When FadeOut() method will be execute then opacity will be "0%" of selected element and when FadeIn() method will be execute then opacity will be "100%" of selected element.
Syntax
Example
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#but1").click(function () {
$("div").fadeOut()
});
$("#but2").click(function () {
$("div").fadeIn();
});
});
</script>
</head>
<body>
<div style="background-color: Red; height: 75px; width: 150px" id="ss">
</div>
<button id="but1">
FadeOut</button>
<button id="but2">
FadeIn</button>
</body>
</html>
|
Output

You may also want to read these related articles: here
Ask Your Question
Got a programming related question? You may want to post your question here