When my page loads, I am trying to make some text slide down and fade in simultaneously, but I am having trouble making it work. The fadeIn animation won't happen at all.
Here is the HTML code:
<div id="animate" class="landing-text">
<div class="landingText cantSee">
<h1 class="newFont oColor textShadow">
ELEVATEDMOVEMENT</h1>
<h3 class="newFont oColor textShadow">
Pushing the limits of movement</h3>
<div class="container">
<a href="#" class="btn btnColor
btn-lg newFont">
Shop</a>
</div>
</div>
</div>
The CSS code:
.cantSee
{
opacity: 0.0;
}
.animateText
{
opacity: 1.0;
transition: opacity 0.5;
}
In terms of JavaScript:
$(window).load(function() {
var div = document.getElementById("animate");
div.className += " animateText";
});
I'm unsure why nothing is happening when the page loads. As a beginner in web design, I might be making a simple mistake and would greatly appreciate any help!