I'm new to web development and I'm building a game in which the object is to avoid touching animated circles with the pointer. I set this up with a mouseenter event (full JSFiddle below):
$("#"+circleName).mouseenter(function(){
$(this).attr("class", "redcircle");
});
This turns the circles red when the user moves the pointer into them. However, when the mouse is stationary, the circles can pass through it safely. Is there a better way to do this?
By changing the mouseenter event to a hover event, the event is triggered when the animated circle touches the stationary mouse. However, there seems to be a delay. Does anyone know why this might be?
This sounds like it's related to the issue found here, which means that it may have to do with the related browser bug:
getting a mouseenter event from a still mouse entering an animated element