HTML Code
<div>
<img id="in" width="300px">
</div>
JavaScript Code
var image = document.getElementById("in");
image.src = "http://ift.tt/1BfFSww";
image.animate({marginTop: "100vh"});
Everytime I run this program, I am able to load the image, but I am unable to perform the animation on it. I get this error:
Uncaught TypeError: Failed to execute 'animate' on 'Element': No function was found that matched the signature provided.
What should I do to fix this?
Thanks in advance!
Aucun commentaire:
Enregistrer un commentaire