JSFiddle - React, Tailwind, and code Playground

by dixalex

HTML

<div id='leftColWrapper'>Left</div>
<div id='breadcrumbWrapper'>Middle</div>
<div id='rightColWrapper'>Right</div>

CSS

div {
    border: solid 1px #ACE;
    width: 150px;
    text-align: center;
    font-family: arial;
}

#colWrapperContainer {
    padding: 5px;
    width: 152px;
    border: solid 1px red;
}

JavaScript

//http://stackoverflow.com/questions/33483000/clearinterval-function-not-clearing-setinterval-function/33483267#33483267
//Auto Wrap Solution
//Alexander Dixon [11-02-2015]
var wrapThese = $("#breadcrumbWrapper, #leftColWrapper, #rightColWrapper");
var colWrapper = setInterval(function () {
    if ($('div#colWrapperContainer').length > 0) {
        var doNothing = "";
        clearInterval(colWrapper);
    } else {
        wrapThese.wrapAll('<div id="colWrapperContainer"></div>').addClass('success');
    }
}, 100);