JSFiddle - React, Tailwind, and code Playground

HTML

<div id="boo">This is boo</div>

JavaScript

function wrap(id) {
    return new wrap.init(id);
};

wrap.init = function(id) {
    this[0] = document.getElementById(id);
    return this;
};

wrap.init.prototype = {
    colorMe: function(color) {
        this[0].style.color = color;
        return this;
    }
};

$(function() {
    wrap('boo').colorMe('red');
});