JSFiddle - React, Tailwind, and code Playground

by Hari Menon

HTML

<div id="a" style="background:#ccc;float:left;"></div>
<div id="b" style="background:#990000;float:left;"></div>

JavaScript

$(document).ready(function() {
    $.xpto = function(dom, speed) {
        var i = 0;
        interval = setInterval(function() {
            i++;
            $(dom).append(i + '<br>');
        }, speed);
    };

    $.xpto('#a', 1000);
    $.xpto('#b', 2000);
});