JSFiddle - React, Tailwind, and code Playground

by Terry Mun

JavaScript

var content = '<input type=&quot;text&quot; ng-model=&quot;test1&quot; />';
var txt =     '<button type="button" data-container="body" ' +
                     'data-toggle="popover" title="myTitle" data-html="true" '+
                     'data-content="'+content+'">Click</button>';

$('body').append(txt);
$(document).on('click', 'button', function() {
    $(this).after($(this).attr('data-content'));
});