JSFiddle - React, Tailwind, and code Playground

HTML

<div id="content"></div>
<div class="tab">1</div> <div class="tab">2</div>
<script>
var iMstup= new Array();
iMstup[0]="<div id='view1'><a class='add'>Кликни</a><div class='add'></div></div>";
    // после клика появиться Run - из верхнего меню, полученный аяксом
iMstup[1]="<div id='view2'><h1>Ололоша 2</h1></div>";
$('.tab').bind("click",function(){
var num = ["first","second","third"],
id = $(this).index() - 1,
currentTemplate = iMstup[id];
    //alert(id)
$('#content').html(iMstup[id]);
})
</script>

<script>
$('.add').live("click",function(){
$(this).load('/XDT4G/ #run');
    return false;
});
</script>

CSS

.tab{
    background:black;
    color: white;
    padding: 5px 10px;
    display: inline-block;
    cursor: pointer;
}
.add{
    background: green;
    cursor: pointer;
    
}