Fade the background-color of a span tag with JQuery

前端 未结 12 679
北恋
北恋 2020-12-09 16:20

I\'m trying to fade the background-color of a span tag using JQuery to emphasize when a change has occured. I was thinking the code would be someting like the following ins

12条回答
  •  佛祖请我去吃肉
    2020-12-09 16:46

    May be late to answer, but a straight solution to your answer.

     $('span').css('background-color','#').animate({backgroundColor: '#'},{duration:4000});
    

    Simple. No need of jqueryUI plugin, 3rd party tools and all.

提交回复
热议问题