As  a  patch  before  you move to Slick where everything is already in
document  order, here's a function to resort an array of elements into
document order even if you are using Moo 1.2x.

    http://jsfiddle.net/XCPdb/3/

To  sort  it uses either

· `sourceIndex` reflection property in IE

· the standard `compareDocumentPosition` method in DOM 3 browsers

· querySelectorAll for the rest, such as Safari 3.x

The  first  two  are thanks to a well-circulated article by PPK, while
the final fallback may or may not be my own invention.

-- S.

Reply via email to