JSFiddle - React, Tailwind, and code Playground

by nickadeemus2002

JavaScript

$.jQpopup = {
    minHeight: 100,
    minWidth: 200,
    imagePath: "images/",
    popupwrapper: null,
    box: function (a) {
        var e = '<div id="' + a + '_p" class="jqpopup"><div class="bg-popup"><div class="bg-body">';
        e += '<div class="jqpopup_header"><div id="' + a + '_ph"></div>';
        e += "<div>";
        e += '<div id="' + a + '_pl" class="jqpopup_center"></div>';
        e += '<div id="' + a + '_px" class="jqpopup_cross"></div>';
        e += "</div>";
        e += "</div>";
        e += '<div id="' + a + '_pm" class="jqpopup_message"></div>';
        e += '<div id="' + a + '_pc" class="jqpopup_content"></div>';
        e += '<div id="' + a + '_pf" class="jqpopup_footer"></div>';
        e += "</div>";
        e += "</div>";
        e += "</div>";
        return e
    },
    toTopEvent: function () {
        var a = this.id.substr(0, this.id.length - 1),
            e = 0;
        $(".jqpopup").each(function () {
            if ($(this).css("zIndex") > e) e = $(this).css("zIndex")
        });
        var c = parseInt(e) + 1;
        $("#" + a).css("zIndex", c)
    },
    toTop: function (a) {
        var e = a.substr(a.length - 2);
        a = a;
        if (e != "_p") a += "_p";
        var c = 0;
        $(".jqpopup").each(function () {
            if ($(this).css("zIndex") > c) c = $(this).css("zIndex")
        });
        e = parseInt(c) + 1;
        $("#" + a).css("zIndex", e)
    },
    toCenter: function (a) {
        var e = parseInt($(window).scrollTop()),
            c = parseInt($(window).scrollLeft());
        a = a + "_p";
        $("#" + a).offset();
        var k = parseInt($("#" + a).width()),
            m = parseInt($("#" + a).height());
        c = parseInt($(window).width()) / 2 - k / 2 + c;
        e = parseInt($(window).height()) / 2 - m / 2 + e;
        $("#" + a).css({
            left: c,
            top: e
        })
    },
    open: function (a, e) {
        if ($("#" + e).html() != "") {
            var c =...