I have this HTML code:
<div id="main">
<div id="dv_7">...</div>
<div id="dv_1">...</div>
<div id="dv_8">...</div>
<div id="dv_4">...</div>
<div id="dv_11">...</div>
<div id="dv_2">...</div>
</div>
How to order the divs in the maindiv with javascript? I have no idea 🙁
thanks in advance,
How about:
Live demo: http://jsfiddle.net/ZEKrH/6/
(You’ll need to shim those array methods for IE8.)