JSFiddle - React, Tailwind, and code Playground

by Mottie

JavaScript

var myplugin;
(function($){

  myplugin = $.fn.myplugin = function() {
    return this.each(function() {
      // plugin code here
      console.log(myplugin.myvar);
    });
  };

  myplugin.myvar = { test: true };

})(jQuery);

$('body').myplugin();