Hide a message after 5000 milliseconds with jquery - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:hide

Description

Hide a message after 5000 milliseconds with jquery

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.6.3.js"></script> 
      <script type="text/javascript">
    $(window).load(function(){//from  w  w  w.  j av  a 2  s  .  c o  m
$(function(){
   $('.message').delay(5000).fadeOut('slow');
});
    });

      </script> 
   </head> 
   <body> 
      <div class="message">
         This is a message
      </div>  
   </body>
</html>

Related Tutorials