jquery equivalent for css3 transition ease-in

Posted by Sebsemillia on Stack Overflow See other posts from Stack Overflow or by Sebsemillia
Published on 2011-02-07T23:18:06Z Indexed on 2011/02/07 23:25 UTC
Read the original article Hit count: 217

Filed under:
|
|
|

I want to make a jquery version of this css3 effect so that it also works in ff and ie:

a:hover {color: #354250; -webkit-transition:background 500ms ease-in;}
a.more:hover, a.more:focus, a.more:active {background-position: 0 -18px;}
a.more:link, a.more:visited {

background: url(images/moreButton.png) no-repeat 0 0; display: inline-block; height:18px; margin-top:10px; text-indent: -9999px; width:77px; }

My tries didn't work, here is what I' ve got so far.

$("a.more").hover(function() {

$(this).stop().animate({ color: '#354250', backgroundPosition: '0px -18px' }, slow, function() { $(this).stop().animate({ color: '#ad5332', backgroundPosition: '0px 0px'}, 0); }); }, function() { $(this).stop().animate({ color: '#ad5332', backgroundPosition: '0px 0px' }, 0); });

Do you have any idea how to fix this? Thank you very much!

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about webkit