JSFiddle - React, Tailwind, and code Playground

by seefeld

HTML

<div id="main"></div>

JavaScript

$.fn.redBorder = function () {
    $(this).css("border", "1px solid red");
    return this;
};

$.fn.greyBackground = function () {
    return $(this).css("background-color", "grey");
};

$.fn.innTxt = function (txt) {
    return $(this).html(txt);

};


$('#main').redBorder().greyBackground().innTxt("testing chaining");