14
Why does onmouseover run multiple times while I hover over one element?
I'm trying to run a simple animation when the user hovers over an icon but it runs multiple times.
I'm testing it here:
http://lujanventas.com/test.php
Anyway, any ideas on how to fix it? maybe using a listener instead?
This is the javascript running onmouseover:
function upIcon(n) {
console.log("Mouseover icon: " + n);
$('#icon' + n).animate({ backgroundPositionY : "-=15px" }, 200 );
$('#icon' + n).animate({ backgroundPositionY : "+=15px" }, 200 );
}