I have an object that I want to start as hidden. I have tried to use each one of these styles one at a time. I have them in a class, not as inline styles.
display:none;
and
opacity:0;filter:alpha(opacity=0);
Now, these both worked obviously, the objects load hidden. The issue is that when I use these, the JQuery .fadeIn() function doesn't work. In fact, when I set the opacity to .5 (50), the fade in only fades in to .5 (50).
So what can I default the object to that will allow the .fadeIn() function to work?
Thanks!
Hi is code with working version
HTML
<html>
<body>
<p>test</p>
</body>
</html>
jquery
$(document).ready(function() {
$('p').fadeTo('slow', 1, function() {
// Animation complete.
});
});
CSS
p{
display:none;
opacity:0.0;
filter:alpha(opacity=0);
}
live demo