Fade in fade out by time

Description

The following code shows how to fade in fade out by time.

Example


<html>
<head>
<script
  src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript">
  $(document).ready(function() {<!--  w  w w . j a  v  a2  s . c  o m-->
    $("div").hover(function() {
      $(this).fadeOut(100);
      $(this).fadeIn();
      $(this).fadeIn(500);
      $(this).fadeOut();
    });
  });
</script>
</head>
<body>
  <div>
    <h1>java2s.c o m</h1>
  </div>
</body>
</html>

Click to view the demo





















Home »
  jQuery »
    jQuery Example »




Animation
DOM
Event
Form
List
Select
Style
Table
Utilities