Codesnipp.it Social Code Sharing

Sergei Tatarinov

Animating opacity of an element on mouse over/out

by Sergei Tatarinov on Dec 11, 2011

$(document).ready(function(){$(".foo").mouseover(function(){$(this).stop(true).animate({opacity:0.x},{duration:xxx})});$(".foo").mouseout(function(){$(this).stop(true).animate({opacity:1},{duration:xxx})})});

Can't see the comments? Please login first :)