Using Bootstrap's grid system, I have created a layout with a sidebar. The structure is as follows:
<div class="row">
<div class="col-md-3">
...
</div>
<div class="col-md-9">
<div class="row">
<div class="col-md-4">...</div>
<div class="col-md-4">...</div>
<div class="col-md-4">...</div>
</div>
</div>
</div>
https://i.sstatic.net/akoi9.png
When viewed on mobile, the red area appears above the green one. I am seeking a solution to toggle between them conveniently without having to scroll, potentially using a switch button like this:
https://i.sstatic.net/1a7EO.png
It is important to take note of the different element order in the green area.
Is there an efficient way to achieve this design requirement? Or would it be necessary to manipulate the DOM using JavaScript? Thank you for your assistance :)