Skip to content

Instantly share code, notes, and snippets.

@chadhietala
Created August 17, 2011 23:44
Show Gist options
  • Save chadhietala/1152938 to your computer and use it in GitHub Desktop.
Save chadhietala/1152938 to your computer and use it in GitHub Desktop.
Subtle Animate In
.item{ width: 120px; height: 200px; position:relative; background: red; opacity: 0; margin-top:100px; float:left; z-index:9999; margin-right: 20px;}
.item_copy{float: left; opacity:0; margin-top:130px; position:relative; z-index:1;}
<div class="item"></div>
<div class="item_copy">Test Test</div>
$(window).load(function() {
setTimeout(function() {
$('.item').css({ top: -50 }).stop().animate({ opacity: 1, top: 0 }, function() {
$('.item_copy').css({left: -50 }).stop().animate({ opacity: 1, left: 0 });
});
}, 500);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment