JSFiddle - React, Tailwind, and code Playground
JavaScript
(function($){
$.fn.test = function(){
var self = this;
this.one = function(){ alert("1"); return self; };
this.two = function(){ alert("2"); return self; };
return this;
};
}(jQuery));
var myplugin = $().test();
myplugin.one().two();