JSFiddle - React, Tailwind, and code Playground

by shapeshifta

HTML

<a class="popup" href="http://www.snoozee.com">popup</a>
<a class="popup" data-popup-width="1000" data-popup-height="1000" href="http://www.wetter.com">popup</a>

JavaScript

/**!
 * trivago apollon
 * http://www.trivago.de/
 *
 * Copyright 2014, trivago GmbH
 * Innovation Center Leipzig
 *
 * @fileoverview popup
 * @author Thomas Horster
 * @requires jquery
 * @lastmodified $$Id$$
 *
 */
(function (factory) {
    'use strict';
    if (typeof define === 'function' && define.amd) {
        // AMD. Register as an anonymous module depending on jQuery.
        define(['jquery'], function (jQuery) {
            return factory(jQuery);
        });
    } else {
        // No AMD. Register plugin with global jQuery object.
        factory(jQuery);
    }
}(function ($) {
    'use strict';
    /**
     * @module jquery-plugin
     * @return {jQuery}
     */
    var pluginName = 'popup',
        defaults = {
            /**
             * title of popup window
             *
             * @property title
             * @type string
             */
            title: 'popup' + new Date().getTime(),
            /**
             * popup default parameters
             *
             * @property params
             * @type string
             */
            params: 'toolbar=0,location=0,scrollbars=0,menubar=0,top=0,left=0',
            /**
             * popup width
             *
             * @property width
             * @type string
             */
            width: screen.availWidth / 2,
            /**
             * popup height
             *
             * @property height
             * @type string
             */
            height: screen.availHeight / 2,
            /**
             * prevent default behaviour
             *
             * @property preventDefault
             * @type boolean
             */
            preventDefault: true
        };

    /**
     * __Popup-Plugin__
     *
     * @class Popup
     * @constructor
     * @param element {Object} element from selection
     * @param options {Object} plugin options
     * @chainable
     */
    function Popup(element, options) {
        var that = this;

       ...