GIF test post 1

Words
188
Reading
1 min
Listen
Play
7y

My First JavaScript Animation


Click Me

function myMove() { var elem = document.getElementById("myAnimation"); var pos = 0; var id = setInterval(frame, 10); function frame() { if (pos == 350) { clearInterval(id); } else { pos++; elem.style.top = pos + 'px'; elem.style.left = pos + 'px'; } } }

Posted from my blog with SteemPress : http://revisesociology.co.uk/gif-test-post-1/

EDIT

Apologies, I'd forgotten I'd synced my test WP account with Steem via steempress! My bad!

Although the animation does actually work on WP - just not on the actual blog post, but on the widget to the side - I tried in both simultaneously and the 'click me' in both the widget and the post version would only make the square in the widget version work.... something else to figure out the why of!

I've now put learning Python on hold to learn html/ css/ javascript first.

GIF test post 1 | Ecency