JSFiddle - React, Tailwind, and code Playground

by oece

HTML

<span id="holder"></span>

JavaScript

(function($) {
    $.fn.writeText = function(content) {
        var contentArray = content.split(""),
            current = 0,
            elem = this;
        setInterval(function() {
            if(current < contentArray.length) {
                elem.text(elem.text() + contentArray[current++]);
            }
        }, 1000);
    };
    
})(jQuery);
$("#holder").writeText("This is some text");