Ocasional Bug!
Ocasional Bug!
Hello all,
I made myself a small script, to change the background color of a div and the image inside it.
However sometimes, when i mouse out or mouse over it, they don't work. But this is something that happens like 1 every 20 times.
And i have no ideia, why this is happening! Im to "newb" in JQuery to solve this issue
-
//BOTTOM
$(document).ready(function(){
//esconder imagens
$("#imgone").fadeTo("fast", 0.0);$("#imgtwo").fadeTo("fast", 0.0);$("#imgthree").fadeTo("fast", 0.0);
$(".teste").hover(function()
{
$(this).animate({backgroundColor:'#0f7777'}, 400);
$("#img" + $(this).attr('id')).fadeTo(400, 1.0);
},
function()
{
$(this).animate({backgroundColor:'#006e6f'}, 500);
$("#img" + $(this).attr('id')).fadeTo(500, 0.0);
}
);
});