Created
October 6, 2015 21:34
-
-
Save royhowie/dfdfb94322f9cbe67f85 to your computer and use it in GitHub Desktop.
velocity.js usage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Test1 Velocity</title> | |
<script src="./velocity.js"></script> | |
<script> | |
function press () { | |
Velocity(document.getElementById("sq"), { opacity: 0.3}, { duration: 2000, easing: "ease-in-out", loop: 5 }); | |
return false; | |
} | |
</script> | |
</head> | |
<body> | |
<h1>Sample SVG with Velocity</h1> | |
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="400" height="400"> | |
<rect id="sq" x="25" y="25" width="200" height="200" fill="lime" stroke-width="4" stroke="pink" onclick="press()"/> | |
</svg> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
note that "velocity.js" is in the same directory as "velocity.html"