Skip to content

Instantly share code, notes, and snippets.

@brainwipe
Created November 21, 2013 15:34
Show Gist options
  • Save brainwipe/7583745 to your computer and use it in GitHub Desktop.
Save brainwipe/7583745 to your computer and use it in GitHub Desktop.
A simple Raphael.js SVG animation (fragment) where a rectangle moves 100 pixels horizontally and 50 pixels vertically.
<div id="container"></div>
<script>
var paper = new Raphael(document.getElementById('container'), 500, 400);
var rect = paper.rect(10, 20, 300, 200);
rect.animate({
x: 100,
y: 50
}, 1000);
</script>
@brainwipe
Copy link
Author

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