compareDocumentPosition()

Compares the postion of two nodes.

Syntax

behavior.compareDocumentPosition(node1, node2);

Notes

Please read the W3C documentation for this method.

Mozilla’s documentation provides information about the return value.