Knowledge Walls
Gopal Rao
Mumbai, Maharashtra, India
Passcode:
Fadeout jquery example in Jquery functions of JQuery Examples
2961 Views
Hints 
fadeOut() function used to blink and hide the element.Example :1, when you click an element it hide another element with some blink.

fadeIn() function used to blink and show the element.Example :2, when you click an element it shows another element appear with some blink.
Example: 1 Code
<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>
Example: 1 Demo 
Example: 2 Code
<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 
Previous Topics
Previous lessons of current book.
Best Lessons of "JQuery Examples"
Top lessons which are viewed more times.
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details