So I have a complicated setup.
I have 2 rows of three divs on large devices.
Similar to.
<div class="row row-1">
<div class"square">square 1</div>
<div class"square">square 2</div>
<div class"square">square 3</div>
</div>
//some more html
<div class="row row-2">
<div class"square">square 4</div>
<div class"square">square 5</div>
<div class"square">square 6</div>
</div>
When viewed on mobile I need to have the first 2 squares of each row in the top row. And the last square of each row in the bottom row. So it would like like the below
<div class="row row-1">
<div class"square">square 1</div>
<div class"square">square 2</div>
<div class"square">square 4</div>
<div class"square">square 5</div>
</div>
//some more html
<div class="row row-2">
<div class"square">square 3</div>
<div class"square">square 6</div>
</div>
What is the best way to do this? I was thinking of using jquery to detect screen size and just moving the squares, but is this easiest?
Thanks