I Can't Create Ring That Moves With Mouse

Hi All,

I am using Visual Studio. When I type in animationiteration it does come up on the list? What extension must I add?
How do I get the code below to create a ring on the computer screen of the computer game that moves with the mouse?

Best regards,

Yanni

var hole = document.getElementById("hole");
var game = document.getElementById("game");
var score = 0;

hole.addEventListener("animationiteration", RanHole) // need to figure out what animationiteration is


function RanHole(){
    var random =-((Math.random()*350)+150)
    hole.style.top = random+"px";
}

Welcome to the forums, @sterianosjohn

[off-topic]
When you post code in the forum, you need to format it. To do so you can either select all the code and click the </> button, or type 3 backticks ``` on a separate line both before and after the block of code.

I have done it for you this time.
[/off-topic]

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.