Determining the order of DOM elements
- by sonofdelphi
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.