开发者

animate text-align with jquery

开发者 https://www.devze.com 2023-01-17 15:24 出处:网络
I\'m new to jquery and have developed a simple resizing navigation menu using $(this).stop().animate({width:170},\"slow\");

I'm new to jquery and have developed a simple resizing navigation menu using

$(this).stop().animate({width:170},"slow");

for the on hover effect.

My question is, how would i be able to add an animate effect to changing the text alignment.

I understand that this changes it:

$('.myElementClass').css('text-align','center');

but it looks ugly, and:

$(this).stop().animate({'text-align: left'}, "slow");

does'nt work at all开发者_Go百科.


You cannot use textAlign as it is not numeric and cannot be eased in between states.

0

精彩评论

暂无评论...
验证码 换一张
取 消