Ordering DOM elements

Posted by sonofdelphi on Stack Overflow See other posts from Stack Overflow or by sonofdelphi
Published on 2010-04-23T08:04:46Z Indexed on 2010/04/23 10:13 UTC
Read the original article Hit count: 287

Filed under:
|

Given two DOM elements, say a and b, how can we determine which comes first in the document?

I'm implementing drag and drop for a set of elements. And the elements can be selected in any order, but when they are dragged, these elements need to be moved in the "correct" order.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about dom