JSFiddle - React, Tailwind, and code Playground
HTML
<div style="background-color: red;">1</div>
<div class="div2" style="background-color: blue;">2</div>
<div class="div3" style="background-color: green;">3</div>
CSS
html, body {
margin: 0;
padding: 0;
height: 100%;
width: 100%;
display: -webkit-flex;
-webkit-align-items: stretch;
-webkit-align-content: stretch;
}
div {
-webkit-flex-grow: 1;
color: white;
font-size: 3em;
padding: 2em;
}
.div2 {
-webkit-order: -1;
}
}
JavaScript
$('.div3').click(function(e) {
$(e.target).css('-webkit-order', -2);
$(e.target).css('background-color', 'orange');
});