Change text (html) with .animate

后端 未结 7 2093
灰色年华
灰色年华 2020-12-23 20:04

I am trying to animate the html part of a tag ( This Text! ) using jQuery\'s Animate function, like so:

7条回答
  •  轮回少年
    2020-12-23 20:27

    See Davion's anwser in this post: https://stackoverflow.com/a/26429849/1804068

    HTML:

    Something in English

    JQUERY

    $('#mySpan').animate({'opacity': 0}, 400, function(){
            $(this).html('Something in Spanish').animate({'opacity': 1}, 400);    
        });
    

    Live example

提交回复
热议问题