JSFiddle - React, Tailwind, and code Playground

JavaScript

(function(){
      $.fn.tagPicker = function(source){
          
          //define attachPicker
          this.attachPicker = function(){
            //code here
              alert('test');
          }
         // this.attachPicker();
          return this;
      }
})(jQuery);
$(document).ready(function(){
    obj=$(this).tagPicker('test');
    obj.attachPicker();
})