css/javascript start faded out by default, then fade in
问题 I'm trying to make a button that causes a green check image to fade in then fade out again. It mostly works, but how do I make the check start out in the faded out position when the page loads? I tried to put opacity: 0; in its css, assuming that the fadeIn function changes the opacity, but then it doesn't show up at all. function green_check(check) { //fade in half a sec, hold 2 sec, fade out in 3 sec $(check).fadeIn(500, function() { $(this).delay(2000).fadeOut(3000); }); } <script src=