I have a list of elements:
-
I know this is an old question, but google lead me to it.
There is a sub property on flexbox (css) called 'order', that allow you to choose the order that elements are displayed. Is possible to use javascript to change this sub property and reorder the displayed elements.
https://www.w3schools.com/cssref/css3_pr_order.asp
Edit 1 - code example:
One
Tow
Three