JSFiddle - React, Tailwind, and code Playground

by chovy

JavaScript

(function() {
    if (typeof window.jQuery === 'undefined') {
        var jquery = document.createElement('script'),
            jqueryui = document.createElement('script');

        jquery.src = '//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js';
        jqueryui.src = '//ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js';

        document.head.appendChild(jquery);
        document.head.appendChild(jqueryui);
    }
})();

(function($) {
    $.fn.extend({
        'addHeading': function() {
            return this.each(function() {
                var o = $(this),
                    h1 = $("<h1>New Heading Added!</h1>");

                o.append(h1);
            });
        }
    });
})(jQuery);

$("div").addHeading();
$("div").draggable();