JSFiddle - React, Tailwind, and code Playground

by oroce

HTML

<script src="http://github.com/malsup/blockui/raw/master/jquery.blockUI.js?v2.31"></script>
<link rel="stylesheet" href="http://jquery.malsup.com/block/block.css?v3">
<div></div>

JavaScript

$.notification = {
    defaults: {
        type: "normal"
    }
}(function($, undefined) {
    $.fn.sysNotification = function(options) {
        console.log(options);
    };
})(jQuery);
(function($, undefined) {
    $.fn.normalNotification = function(options) {
        console.log(options);
    };
})(jQuery);
(function($, undefined) {
    $.fn.notification = function(options) {
        options = $.extend({}, $.notification.defaults, options);
        return this.each(function(i, elem) {
            $(elem)[options.type + "Notification"].apply(this, arguments);
        });
    };
})(jQuery);
$(document).ready(function() {
    $("div").notification({
        type: "sys"
    });
});