jQuery animate, doesn't animate -
i'm using animate() function change background position of button on hover, problem instead of 'animating' waits duration (500) , flicks new background position - without smooth transition.
$('.confirm').hover(function() { $(this).animate({backgroundposition: '0, -40px'}); }, function() { $(this).animate({backgroundposition: '0, 0'}); });
that's js i'm using. ideas why it's not doing smooth transition? it's acting timeout. have both jquery , ui defined.
thanks!
you can't natively animate background position. animation properties expect single value, opacity:1
, left:'50px'
, etc.
this plugin should add functionality need: http://www.protofunc.com/scripts/jquery/backgroundposition/
Comments
Post a Comment