JSFiddle - React, Tailwind, and code Playground
HTML
<body>
<content>
<div id="box1" class="box">A: <span class="num">0</span></div>
<div id="box2" class="box">B: <span class="num">0</span></div>
<div id="box3" class="box">C: <span class="num">0</span></div>
</content>
</body>
CSS
content {
display: -moz-box;
display: -webkit-box;
display: box;
box-orient: horizontal;
width: 100%;
height : 100%;
}
div {
-moz-box-flex: 1;
-webkit-box-flex: 1;
box-flex: 1;
height: 100px;
}
#box1 {
background : #FCC;
}
#box2{
background : #CFC;
}
#box3{
background : #CCF;
}
JavaScript
$( function() {
$('.box').click( function() {
var num = $(this).find('.num');
num.text( parseInt(num.text()) + 1 );
});
});