JSFiddle - React, Tailwind, and code Playground

by John Grivas

JavaScript

$(function($){
    $.fn.dialog = function(command, options) {
        var opts = $.extend( {}, $.fn.dialog.defaults, options );
        //code
        $.fn.dialog.handleCancel = function() {

        };
        $.fn.dialog.handleAccept = function() {

        };
        return this;
    };

    $.fn.dialog.defaults = {
        // some other props
        onCancel: $.fn.dialog.handleCancel(),
        onAccept: $.fn.dialog.handleAccept()
    };
    // code
}(jQuery));