JSFiddle - React, Tailwind, and code Playground

by jasonmerino

HTML

<div style="background-color: #333;">1</div>
<div class="div2" style="background-color: #555;">2</div>
<div class="div3" style="background-color: #777;">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');
});