JSFiddle - React, Tailwind, and code Playground

Not sure what this does- but it has a infxdialog in it

by Ben Clayton

HTML

<script src="//code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
<button class="dog">Show2</button>

JavaScript

(function($){
    $.infxdialog = function(el, local, data, url, url_parameters, result_click, options){
        // To avoid scope issues, use 'base' instead of 'this'
        // to reference this class from internal events and functions.
        var base = this;
        
        // Access to jQuery and DOM versions of element
        base.$el = $(el);
        base.el = el;
        
        // Add a reverse reference to the DOM object
        base.$el.data("infxdialog", base);
        
        base.init = function(){
            base.local = local;
            base.data = data;
            base.url = url;
            base.url_parameters = url_parameters;
            base.result_click = result_click;
            
            base.options = $.extend({},$.infxdialog.defaultOptions, options);
            
            // Put your initialization code here
            console.log("init");
        };
        
        // Sample Function, Uncomment to use
        // base.functionName = function(paramaters){
        // 
        // };
        base.showdialog = function(parameters){
          alert(parameters);  
        };
        
        // Run initializer
        base.init();
    };
    
    $.infxdialog.defaultOptions = {
        local: true
    };
    
    $.fn.infxdialog = function(local, data, url, url_parameters, result_click, options){
        return this.each(function(){
            (new $.infxdialog(this, local, data, url, url_parameters, result_click, options));
        });
    };
    
})(jQuery);

$(document).ready(function(){
    $(".dog").infxdialog();
    $(".dog").on('click',function(){
        console.log('click Show2');
        $(".dog").infxdialog();
    });
    console.log("done");
});