How to detect when an element over another element in JavaScript?
问题 I wrote most of the code... And when the element is "fully" over the other element it works. The problem is that I don't just want it to be true when the element is "fully" over the element, I also want it to be true when the element is partly over the other element. Here is my code: element = this.element.getStyles('left', 'top', 'width', 'height'); elementLeftX = element.left.toInt(); elementLeftY = element.top.toInt(); elementRightX = (element.width.toInt() + element.left.toInt());