Use fade in jquery for prepend - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:fadeIn

Description

Use fade in jquery for prepend

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.5.2.js"></script> 
  <style id="compiled-css" type="text/css">

#bob{//  www .  j  av a  2  s  .  co m
   color: blue;
}


      </style> 
  <script type="text/javascript">
    $(window).load(function(){
$('#test').prepend($('<div id="bob">Hi der</div>').fadeIn('slow'));
    });

      </script> 
 </head> 
 <body> 
  <div id="test">
    Hi asdf 
  </div>  
 </body>
</html>

Related Tutorials