JSFiddle - React, Tailwind, and code Playground
by jeffgw
HTML
<div id="target"></div>
JavaScript
$(function() {
// Create random number for DIV id
var id = Math.floor((Math.random() * 10000) + 1);
// Append the DIV to the "target" DIV
$('#target').append("<div id='"+id+"'></div>");
// Insert some HTML into the new DIV
$('#' + id).html('<p>Test</p>');
});