JSFiddle - React, Tailwind, and code Playground
by darcyclarke
JavaScript
var postid = 1;
$('<div id="p'+postid+'" class="post-'+postid+' page type-page status-publish hentry block"><div id="inner'+postid+'" class="innerBlock"></div></div>').appendTo($('#wrapperInner'));
////////////////////////////////////////////////
// Much better and readable
////////////////////////////////////////////////
// Create Div
var div = document.createElement('div');
div.id = "p"+postid;
div.className = "post-"+postid+" page type-page status-publish hentry block";
// Create Child
var child = document.createElement('div');
div.id = "inner"+postid;
div.className = "innerBlock";
// Append
div.appendChild(child);
// Append
$('#wrapper').append(div);
////////////////////////////////////////////////
// OR
////////////////////////////////////////////////
/*
var div = document.createElement('<div id="p'+postid+'" class="post-'+postid+' page type-page status-publish hentry block"><div id="inner'+postid+'" class="innerBlock"></div></div>');
document.getElementById('wrapper').appendChild(div);
*/