I have written a script that changes the box's color in another box's hover: http://jsfiddle.net/w5b9v/2/
How can I add animation to this transition? Thanks in advance
See Question&Answers more detail:osI have written a script that changes the box's color in another box's hover: http://jsfiddle.net/w5b9v/2/
How can I add animation to this transition? Thanks in advance
See Question&Answers more detail:osYou could do something this way http://jsfiddle.net/steweb/fn68L/
js:
$(document).ready(function(){
$(".wrapper div.me:last").addClass("reduce");
$(".wrapper div.me").hover(
function(){
$(this).fadeTo('fast',1); //or $(this).animate({opacity:1},300/*ms*/)
$(".wrapper div").not(this).fadeTo('fast',0.8);
});
});
Or you can check Animate to Class jquery plugin ;)