Oycheungad (Talk | contribs) |
Oycheungad (Talk | contribs) |
||
Line 94: | Line 94: | ||
// calculate pageX/Y - logic taken from jQuery. | // calculate pageX/Y - logic taken from jQuery. | ||
// (This is to support old IE) | // (This is to support old IE) | ||
− | if (event.pageX == null && event.clientX != null) { | + | if (event.pageX == null&&event.clientX != null) { |
− | eventDoc = (event.target && event.target.ownerDocument) || document; | + | eventDoc = (event.target&&event.target.ownerDocument) || document; |
doc = eventDoc.documentElement; | doc = eventDoc.documentElement; | ||
body = eventDoc.body; | body = eventDoc.body; | ||
event.pageX = event.clientX + | event.pageX = event.clientX + | ||
− | (doc && doc.scrollLeft || body && body.scrollLeft || 0) - | + | (doc&&doc.scrollLeft || body&&body.scrollLeft || 0) - |
− | (doc && doc.clientLeft || body && body.clientLeft || 0); | + | (doc&&doc.clientLeft || body&&body.clientLeft || 0); |
event.pageY = event.clientY + | event.pageY = event.clientY + | ||
− | (doc && doc.scrollTop || body && body.scrollTop || 0) - | + | (doc&&doc.scrollTop || body&&body.scrollTop || 0) - |
− | (doc && doc.clientTop || body && body.clientTop || 0 ); | + | (doc&&doc.clientTop || body&&body.clientTop || 0 ); |
} | } | ||
Revision as of 10:44, 30 August 2017
Name:
CoorX: CoorY:
our advisors