Display a sentence, one character at a time

后端 未结 6 2082
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-10 03:00

I want to display a sentence one character at a time, one by one, with jQuery. Is there a plugin that can do this Or how could I get this effect?

6条回答
  •  别跟我提以往
    2021-02-10 03:28

    var chars = $("#target").html().split(/./);
    var content = "";
    $.each(chars, function(index, value) { 
      content += ""+value+""; 
    });
    
    $("#target").html(content);
    $("#target span").each(function(){
      $(this).show();
    });
    

提交回复
热议问题