JSFiddle - React, Tailwind, and code Playground

by Marco Iamonte

HTML

<div id="test" class="test">provetta</div>

CSS

.test {
    color: red;
}

.prova {
 color: blue !important;   
}
}

JavaScript

$ = (function() {
    var getter;
    return {
        id: function(selector) {
            return {
                addClass: function(value) {
                    var el = document.getElementById(selector);
                    el.className += " " + value;
                }
            };
        },
    };
}());

$.id('test').addClass('prova');