Amit Dhamu

Writes Code

Hover Animations

// Animates all anchor tags to animate to 50% opacity on hover
$("a").hover(function() {
    $(this).stop().animate({"opacity": ".5"}, "fast");
}, function() {
    $(this).stop().animate({"opacity": "1"}, "fast");
});

// Animates background colour of all divs on hover - jQuery UI plugin required for animating colour.
$("div").hover(function() {
    $(this).stop().animate({ backgroundColor : "#fe0000"}, "fast");
}, function() {
    $(this).stop().animate({ backgroundColor : "#ffffff"}, "fast");
});


hover / animation / jquery ui / jquery / animate

← Case Insensitive MySQL Select Database Class →