Home
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"> </script> <style> .redDiv { background-color: red; height: 100px; width: 100px; display:none; } </style> <script> $(document).ready(function () { $('#myDiv').fadeIn(5000, function () { $('#msgDiv').append('fadeIn() completed.') }); }); </script> </head> <body> <h1>Demo: jQuery fadeIn() method</h1> <div id="myDiv" class="redDiv"> </div> <div id="msgDiv"></div> </body> </html>
Result: