Possible Duplicate:
javascript - shuffle HTML list element order
After a little bit of help. After something quite simple, but can't seem to find a way of doing it myself.
I've got a dynamic unordered list being generated from some back end code, (not under my control). The list can be anything from 9 tags up to 100+. They are returned in an order, as defined by the backend code. Using jQuery/javascript I would like to be able to randomize the order of the li tags without having any of them repeat.
My my list would currently look something like this:
<ul id="myList">
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
<li>Item 5</li>
<li>Item 6</li>
<li>Item 7</li>
<li>Item 8</li>
<li>Item 9</li>
</ul>