JSFiddle - React, Tailwind, and code Playground

by TimWolla

HTML

<input type="text" id="my-input">

JavaScript

jQuery.fn.extend({
    show_message: function(message) {
        return this.each(function() {
            var block = jQuery('<div class="message">my message:</div>');
            console.log("message:"+message); //I get this one in the console
            block.append(message);
            jQuery(block).insertBefore(jQuery(this));
        });
   }
 });

jQuery('#my-input').show_message('foobar');