Is it possible to reorder <li>
elements with JavaScript or pure jQuery. So if I have a silly list like the following:
<ul>
<li>Foo</li>
<li>Bar</li>
<li>Cheese</li>
</ul>
How would I move the list elements around? Like put the list element with Cheese
before the list element with Foo
or move Foo
to after Bar
.
Is it possible? If so, how?