How to fade in a div on page load?
jQuery/fadeIn
$(function() {
$("#monster").fadeIn();
});
It cannot be simpler:
$(function(){ // $(document).ready shorthand
$('#monster').fadeIn('slow');
});
If your div is not initially hidden, you could hide it before the animation:
$('#monster').hide().fadeIn('slow');
The speed parameter can be 'slow'
, 'normal'
, 'fast'
or the number of milliseconds to run the animation.