JSFiddle - React, Tailwind, and code Playground

by Thomas Upton

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.8/dojo/resources/dojo.css">
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.8/dijit/themes/tundra/tundra.css">
<body class="tundra">
    <div id="cp-one" data-dojo-type="dijit/layout/ContentPane"></div>
    <div id="cp-two" data-dojo-type="dijit/layout/ContentPane"></div>
</body>

CSS

div {
    width: 200px;
    height: 50px;
    border: 1px solid;
}

#one, #cp-one {
    border-color: red;
}

#two, #cp-two {
    border-color: green;
}

JavaScript

require([
    'dijit/form/Button',
    'dijit/registry',
    'dojo/parser',
    'dijit/layout/ContentPane',
    'dojo/domReady!'
], function(Button, registry, parser) {
    
    parser.parse();
   
    var b = new Button({
        label: 'button'
    });
    
    var cp1 = registry.byId('cp-one'),
        cp2 = registry.byId('cp-two');
    
    cp1.set('content', b);
    cp2.set('content', b);
    cp1.set('content', b);
    cp2.set('content', b);
    
    setTimeout(function() {
        cp2.set('content', b);
    }, 2000);
});