JSFiddle - React, Tailwind, and code Playground

by jfriend00

HTML

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

CSS

.foo {
    color:red;
}

JavaScript

function installShims() {
    for (var method in jQuery.fn) {
        if (jQuery.fn.hasOwnProperty(method) && 
            typeof jQuery.fn[method] === "function" && 
            method !== "init") {
            (function(oldMethod, methodName) {
                 jQuery.fn[method] = function() {
                     console.log(methodName);
                     return oldMethod.apply(this, arguments)
                 };
            })(jQuery.fn[method], method)
        }
    }
}

installShims();

$("#test").addClass("foo").html("Hello").removeClass("whatever");