/ Published in: jQuery
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$('.projectHolder').hover( function() { //This is the hover in function $("img", this).stop(); //Stops any animation being done on the button $("img", this).css({opacity:1}); //Changes the opacity back to not if not already $("img", this).animate({opacity:0.5},400); //Now animates the opacity to the user defined value }, function() { //This is the hover out function $("img", this).animate({opacity:1},400); //Animates the opacity back to 1 } )