jQuery Animate: change background color on mouse over -
i want know how can animate background color of div using animate method change background color on mouserover:
i came across post dates 2010 - , states have use plugin this: jquery animate backgroundcolor
but surely, in 2013(with newer jquery libraries), there must simpler, browser supported way of doing in plain jquery:
here attempt:
$('div.entry-content div.one_third').on('hover',function(){ $(this).animate({backgroundcolor: '#f5f5f5'},400); });
you need call after jquery, jquery ui , work. have create short sample
$('.one').hover( function(){ $(this).animate({'backgroundcolor': '#f5f5f5'},400); }, function(){ $(this).animate({'backgroundcolor': '#000'},400); } ); it works fine me
Comments
Post a Comment