JSFiddle - React, Tailwind, and code Playground

by lbstr

HTML

<div>This is an amazing test of unprecidented courage and honor!!!</div>
<button>Go</button>

CSS

.b { font-weight: bold; }

JavaScript

$(function(){
    $('button').click(function(){
        var $div = $('div'),
            text = $div.text(),
            i = 0;
        
        $div.html(
            '<span>' + text.split('').join('</span><span>') + '</span>'
        );
        
        $div.find('span').each(function(){
            
            (function($span){
                setTimeout(function(){
                    $span.addClass('b');
                }, i * 10);
            })($(this));
            
            i++;
        });
    });
});