Animate the color 1sec after page loading (jQuery + CSS3)
HTML
<div class="changeme">
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
</div>
CSS
.changeme {
padding: 1em;
opacity: 0;
background: Pink;
transition: opacity 1s linear;
-moz-transition: opacity 1s linear; /* FF3.7+ */
-o-transition: opacity 1s linear; /* Opera 10.5 */
-webkit-transition: opacity 1s linear
}
.changeme.done {
opacity: 1;
}
JavaScript
$(function () {
setTimeout(
function () {
$('.changeme').stop().toggleClass('done');
},
500
);
});