JSFiddle - React, Tailwind, and code Playground
by Alex Cougarman
HTML
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css">
<div id='clonethis'>
__hidden__
__bigtext__
col-sm-12
</div>
JavaScript
$(document).ready(function(){
var domArray = getDomArray($('#clonethis').clone());
});
function getDomArray(domClone) { var postRows = [];
list_to_replace = {"__hidden__": '', "__bigtext__": "bigtext", "col-sm-12": "col-sm-14"};
$(domClone).each(function() {
$.each(Object.keys(list_to_replace), function(item) {
var re = new RegExp(item, "g");
$(this).html(function (index, html) {
return html.replace(re, list_to_replace[item]);
});
});
postRows.push($(this).html());
});
return postRows;
}