Skip to content

Instantly share code, notes, and snippets.

@andredublin
Created October 4, 2011 22:44
Show Gist options
  • Select an option

  • Save andredublin/1263072 to your computer and use it in GitHub Desktop.

Select an option

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>
@andredublin
Copy link
Copy Markdown
Author

Not sure if you were using mixin's here, but the z-index in that context might conflict. Notice that I added the suffix of px to the number.

@rhodee
Copy link
Copy Markdown

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
Copy Markdown

rhodee commented Oct 5, 2011

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

@andredublin
Copy link
Copy Markdown
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