JSFiddle - React, Tailwind, and code Playground
JavaScript
(function($){
$.fn.plugin = function(){
return {
method1 : function(text){
console.log(text);
}
}
};
}(jQuery));
var smth = $('.js-selector').plugin();
smth.method1('text this');