Skip to content

Instantly share code, notes, and snippets.

@andredublin
Created October 4, 2011 22:44
Show Gist options
  • Save andredublin/1263072 to your computer and use it in GitHub Desktop.
Save andredublin/1263072 to your computer and use it in GitHub Desktop.
Updated animation script
.bkgEnvi {
position: relative;
z-index: 1;
}
.moveCloud {
position: absolute;
top: 10px;
right: 50px;
z-index: 5;
}
<div class="bkgEnvi">
<%= image_tag "Cloud_animated.png", :class => "moveCloud" %>
</div>
<script type="text/javascript">
$(document).ready(function(){
$(".moveCloud").animate({
right: 500 + "px"
}, 5000);
});
</script>
@rhodee
Copy link

rhodee commented Oct 5, 2011

Still not a go; what impact would the z-index have on the motion? Without the z-index the images would disappear.

@rhodee
Copy link

rhodee commented Oct 5, 2011

Update sorry had a typo in my update - works like a charm.

@andredublin
Copy link
Author

andredublin commented Oct 5, 2011 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment