JSFiddle - React, Tailwind, and code Playground

by Tom DeBerardine

JavaScript

(function ($) {
    $.fn.extend({
        myPlugin: function (argumentOptions) {
            var self = this;
            self.textSend = 'something';
            
            self.mouseUp(function(e) {
                self.textSend = 'new thing';    
            });
            
            return self;
        }
    });
})(jQuery);

var instantiated = $('body').myPlugin({});
alert(instantiated.textSend);