I have a bunch of divs that I would like to order from lowest to highest based on their ID. The IDs, however, are decimal numbers up to 5DP.
They look like this:
<div id="main">
<div id="1.6125">...</div>
<div id="1.585">...</div>
<div id="1.60125">...</div>
<div id="1.59125">...</div>
<div id="1.62625">...</div>
</div>
I've seen this question: How to order divs by id in javascript? But when I change the askers example to be decimal numbers it does not order the divs for me.
Any help would be appreciated, either jQuery or JS is fine with me.
Many thanks,
G